MySQL创建, 修改,删除用户密码

MySQL创建, 修改,删除用户密码

创建用新户名密码

创建用新户名密码: create user 'test1'@'localhost' identified by 'test1';

修改用户名密码

修改用户名密码:alter user 'root'@'localhost' identified with mysql_native_password by '123456';

修改密码后再执行sql语句:flush privileges;

删除用户


删除用户: delete from mysql.user where host='localhost' and user='test1';

删除用户后再执行sql语句:flush privileges;

详细教程:http://c.biancheng.net/view/7488.html

posted on 2023-03-31 09:30  Steven_YF  阅读(27)  评论(0编辑  收藏  举报