1,在远程访问以前需先配置防火墙 service iptables stop (不推荐,可配置开通3306端口)html
2,受权mysql
mysql> grant all on wordpress.* to wordpress@'192.168.25.%' identified by 'root'; mysql>select host,user from user; 【多出1条远程登陆用户记录】 mysql>flush privileges;(刷新)
mysql -h 192.168.25.136 -uroot -proot