#进入mysql数据库
grant all privileges on *.* to root@'%' identified by 'password';
flush privileges;
#退出后重启服务
systemctl restart mysqld
本文介绍如何使用SQL命令为MySQL数据库的root用户分配全部权限,并确保更改生效的方法。通过执行特定的SQL语句来授予root用户所有权限,然后重启MySQL服务以应用这些更改。
#进入mysql数据库
grant all privileges on *.* to root@'%' identified by 'password';
flush privileges;
#退出后重启服务
systemctl restart mysqld
3094
1166
8753

被折叠的 条评论
为什么被折叠?