mysql 远程root登陆

登陆
mysql -uroot -p
切换数据库
use mysql
更新用户主机
update user set host = '%' where user = 'root' and host='127.0.0.1';
更新密码
UPDATE user SET Password=PASSWORD('10000') where USER='root';
刷新权限
FLUSH PRIVILEGES;

猜你喜欢

转载自blog.csdn.net/lglglgl/article/details/80227660