centos7+docker+pxc
安装教程可以参考[https://blog.csdn.net/u013218587/article/details/80863054]
遇到的坑:
-
navicat连接不上mysql?
首先解决宿主机防火墙问题,最简单是直接关闭;其次就是开启对应端口
systemctl firewall stop
systemctl disable firewall
-
root用户无法在远程连接?
需要现在本地添加用户并授予权限
mysql -u root
进入mysql:
use mysql
CREATE USER ‘root’@’%’ ;
grant all privileges on . to root@"%" identified by ‘123456’ with grant option
-
进入容器后使用mysql指令出现异常 unknown option --ck;
需要先修改容器内mysql配置文件node.cnf (/etc/mysql/node.cnf)最后的ck 字母
docker exec -it node1 bash
vi /etc /mysql/node.cnf