mysql命令

登录:

1.直接登录:mysql -u root -p密码

2.提示输入密码:mysql -u root -p

 

新增账号:
test账号,密码是password
create user test@'%' identified by 'password';

授权CRUD
grant select, insert, update, delete on db名称.* to test@'%' identified by 'password';
grant select, insert, update, delete on db名称.* to test@'localhost' identified by 'password';
flush privileges;

 

posted @ 2022-08-20 15:56  门罗的魔术师  阅读(23)  评论(0)    收藏  举报