1.先控制台进入mysql -u user-p password
2.在mysql控制台执行 GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
(这里的username和password,单独在弄一个用户名和密码,别用root)
3.然后再MySQL>FLUSH PRIVILEGES;
标签:username,GRANT,数据库,MySQL,mysql,password,远程,PRIVILEGES From: https://blog.51cto.com/u_14008060/6314311