创建用户
create user zhx identified by '123456'
查看用户表
select User from mysql.user group by User;
权限分配
grant all privileges on *.* to zhx@'192.168.199.220'
授权完毕之后要刷新权限 flush privileges;
root 用户无法登陆
1. 进入安全模式
mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
mysql -u root mysql
UPDATE user SET Password=PASSWORD('123456') where USER='root';