docker run -itd --name mysql-test -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 mysql

修改my.cnf配置文件
bind-address = 0.0.0.0
skip-network为注释状态

use mysql;
create user 'xxxxx'@'%' identified by 'password';
flush privileges;
grant all privileges on *.* to 'xxxxx'@'%' identified by 'password' with grant option;

标签: none

添加新评论