本文共 463 字,大约阅读时间需要 1 分钟。
注意:(mysql数据库不区分大小写,但符号一定要用英文格式)
查看用户命令:select user,authentication_string,host from user;
创建用户命令一,直接创建:create user 'zhangsan'@'localhost' identified by 'abc123';
创建用户命令二,权限创建:grant all on . to 'lisi'@'localhost' identified by 'abc123';
更改密码命令:set password for 'zhangsan'@'localhost' = password('123abc');
更改用户名:rename user 'lisi'@'localhost' to 'wangwu'@'localhost';
密码忘记时解决办法(mysql5.7版本)
在【mysqld】下面插入
skip-grant-tables
转载于:https://blog.51cto.com/13756916/2165984