mysql的共享连接

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 [email protected]'%' IDENTIFIED BY '0000';(这个是别人连接你的mysql的密码,我写的是0000)
mysql>flush privileges;  
mysql>select host from user where user='root'; 


然后就可以连接了

用SQLyog这个软件来说

mysql的共享连接

点击连接就行了