1.检测配置文件(/etc/mysql/mysql.conf.d/mysqld.cnf) 注释掉bind-address = 127.0.0.1;作用是不再只允许本地访问;
2.重启mysql:/etc/init.d/mysql restart;
3.GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '密码' WITH GRANT OPTION;
4.flush privileges;
本文共 275 字,大约阅读时间需要 1 分钟。
1.检测配置文件(/etc/mysql/mysql.conf.d/mysqld.cnf) 注释掉bind-address = 127.0.0.1;作用是不再只允许本地访问;
2.重启mysql:/etc/init.d/mysql restart;
3.GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '密码' WITH GRANT OPTION;
4.flush privileges;
转载于:https://www.cnblogs.com/againn/p/7717550.html