mysql5.0 允许远程连接时可以这样创建账户
1.授权root用户,密码root,允许远程连接;
grant all privileges on . to ‘root’@’%’ identified by ‘root’ with grant option;
2.将配置写入mysql 授权表中
flush privileges;
到了8.0发现创建账号跟权限必须分开操作
mysql> CREATE USER ‘root’@’%’ IDENTIFIED BY ‘root’;
mysql> GRANT ALL PRIVILEGES ON . TO ‘root’@’%’ WITH GRANT OPTION;
mysql> flush privileges;
来源:CSDN
作者:新星开发
链接:https://blog.csdn.net/weixin_46417690/article/details/104696837