Mysql创建新用户:

Mysql创建新用户:

1、创建账户和密码:(1)insert into mysql.user(Host,User,authentication_string) values("%","test",password("123456"));

(2)


2、把某个库权限赋值给新用户:grant all privileges on 库名.* to test@localhost identified by '123456';

3、为新用户添加远程访问权限:GRANT ALL PRIVILEGES ON 库名.* TO 'test'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;

4、刷新权限表:
flush privileges;

 

Mysql创建新用户:CREATE USER 'xiaoxiao'@'localhost' IDENTIFIED BY '123456';

posted @ 2022-09-16 12:07  小小飞侠  阅读(612)  评论(0)    收藏  举报