create user test identified by 'test';
grant all privileges on *.* to test@"%";
flush privileges;
也可以
GRANT ALL ON *.* TO test@'%' IDENTIFIED BY 'test' WITH GRANT OPTION;
flush privileges;
本文介绍如何使用MySQL命令创建用户并授予所有权限。通过具体SQL语句示范,展示两种不同的方法来实现这一操作,并强调了刷新权限的重要性。
create user test identified by 'test';
grant all privileges on *.* to test@"%";
flush privileges;
也可以
GRANT ALL ON *.* TO test@'%' IDENTIFIED BY 'test' WITH GRANT OPTION;
flush privileges;
3726
3586
3046

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