当前位置:Gxlcms > 数据库问题 > 远程连接mysql

远程连接mysql

时间:2021-07-01 10:21:17 帮助过:2人阅读

win系统下,连接别人的mysql或者让别人链接自己的mysql:

打开命令行cmd

进入mysql:

mysql -u root -p

mysql>use mysql;  
mysql>select host from user where user=‘root‘;  
mysql>GRANT ALL PRIVILEGES ON *.* TO root@‘%‘ IDENTIFIED BY ‘0000‘; (这个是别人连接你的mysql的密码,我写的是0000)
mysql>flush privileges;  
mysql>select host from user where user=‘root‘; 

 

然后就可以连接了

用SQLyog这个软件来说

 技术分享

 

点击连接就行了

远程连接mysql

标签:

人气教程排行