1、进入mysql :mysql -u root -p
2、输入密码
3、grant all privileges on (数据库,*代表所有).* to (用户名)@"%" Identified by "(密码)";
如:grant all privileges on *.* to root@"%" Identified by "root";
4、flush privileges;
(分号不能少)

本文介绍如何使用MySQL命令行工具为用户分配所有权限。通过具体步骤和命令演示,帮助读者掌握MySQL用户权限管理的基本操作。
1、进入mysql :mysql -u root -p
2、输入密码
3、grant all privileges on (数据库,*代表所有).* to (用户名)@"%" Identified by "(密码)";
如:grant all privileges on *.* to root@"%" Identified by "root";
4、flush privileges;
(分号不能少)

199
3342

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