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