1.两种方法
(1).允许mysql远程登录
命令>CREATE USER ‘root’@‘%’ IDENTIFIEDBYPASSWORD‘*password’;
GRANTALLPRIVILEGESON*.*TO‘root’@‘%’ IDENTIFIEDBYPASSWORD‘*password’ WITHGRANTOPTIONMAX_QUERIES_PER_HOUR 0MAX_CONNECTIONS_PER_HOUR 0MAX_UPDATES_PER_HOUR 0MAX_USER_CONNECTIONS 0 ;
本机连接数据库命令>mysql -u root -p
命令>use wordpress4;
命令>UPDATE wp_posts SET post_content=replace(post_content,’mail.test.pub:81′,’mail.test.com:81′
(2).登录phpmyadmin
sql执行语句>UPDATE wp_posts SET post_content=replace(post_content,’mail.test.pub:81′,’mail.test
.com:81′
3.网页图片显示正常。
4.站点url和主页地址可以在wordpress后台修改:
sql>UPDATE wp_options SET option_value = replace(option_value, ‘http://mail.test.pub:81′, ‘http://www.test.com:81′) WHERE option_name = ‘home’ OR option_name = ‘siteurl‘;
结束!
原文链接地址:http://www.xishui139.com/archives/195