2docker run -v /data/var/mysql/:/var/lib/mysql -e YSQL_ROOT_PASSWORD=kS4pJUIb mysql
3docker stop [CONTAINER ID]
4docker run -it -v /data/var/mysql/:/var/lib/mysql mysql /bin/bash
5mysqld_safe&
6grant all privileges on *.* to 'wuxiao'@'%' identified by 'password'
7docker cp [CONTAINER ID]:/etc/mysql/my.cnf /data/local/my.cnf
8docker stop [CONTAINER ID]
9docker run -d -p 3306:3306 -v /data/var/mysql/:/var/lib/mysql -v /data/local/my.cnf:/etc/mysql/my.cnf mysql
10add [CMD] to /etc/rc.local
11OK!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)