1、用root登录后执行 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION; 2、FLUSH PRIVILEGES刷新权限。