1、mysql -u root -p (root)用户名
2、mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
3、mysql>flush privileges;