注意:(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