有时候root需要远程连接,那么就要给mysql的root用户添加远程连接,前提已经安装好mysql。
给root添加远程教程如下
1,添加3306系统防火强
/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
/etc/init.d/iptables save
/etc/init.d/iptables restart
2,添加远程,注意你的root密码,我这里的密码是123456
mysql -uroot -p123456
进入root

create user 'root'@'%' identified by '123456';
grant all on *.* to root@'%' identified by '123456';
FLUSH PRIVILEGES;
exit

3,测试

loxyod2x.png

成功

分类: mysql 标签: 暂无标签

评论

暂无评论数据

暂无评论数据

目录