- 启动MySql
service mysql start
- 登陆MySql
mysql -u root -p
- 切换数据库
use mysql
- 分配权限
update user set host = '%' where user = 'root';
- 刷新权限
FLUSH PRIVILEGES;
- 退出MySql
exit
MySQL允许root用户远程登陆(简洁版)
于 2023-11-30 13:17:39 首次发布
service mysql start
mysql -u root -p
use mysql
update user set host = '%' where user = 'root';
FLUSH PRIVILEGES;
exit