允许本地用户所有权限:
GRANT all privileges ON *.* TO 'root'@'localhost' IDENTIFIED BY 'password';
赋本地用户部分权限:
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP -> ON TUTORIALS.* -> TO 'zara'@'localhost' -> IDENTIFIED BY 'zara123';
flush privileges;
mysqladmin -u root password "888888"
转载于:https://blog.51cto.com/hezun/1637516