GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY '1234' WITH GRANT OPTION;
flush privileges;
%就是可以访问的ip
root用户名
1234密码
mysql 8
CREATE USER 'root'@'%' IDENTIFIED BY '1234';
GRANT ALL ON *.* TO 'root'@'%';
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '1234';
flush privileges;
网友评论