在mysql主机上操作:
mysql -u root -p
use mysql;
select host,user,password from user;
+---------------------+------+--------------------+
| host | user | password |
+---------------------+------+--------------------+
| localhost | root | |
| 127.0.0.1 | root | ***************** |
| localhost | | |
| 192.168.1.2 | root | ***************** |
| 192.168.1.10 | root | ***************** |
把需要修改的IP改成当前电脑的IP就可以了
update user set host='192.168.1.10' where host='192.168.1.188';
别忘记运行下面一句。
flush privileges;
转载请注明出处:
未经允许不得转载:lxfamn » 修改可连接mysql的IP