Mysql 5.7版為
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '!QAZ@WSX' WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit
Mysql 8版為
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '!QAZ@WSX';
FLUSH PRIVILEGES;
exit
CREATE USER 'root'@'%' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* to 'root'@'%';
FLUSH PRIVILEGES;
exit