nano /etc/
[mysqld]
port=12345
添加以上port的设置
运行服务:
systemctl restart
再检查下端口:
netstat -nltp
发现mysql监听两个端口:12345 33060.这是应为MySQL5.7.12 之后新增了X plugin。这个插件默认是启用的,可以在配置配置文件/etc/ 添加mysqlx=0关闭X plugin。 也可以在启动时指定 --mysqlx=0 或 --skip-mysqlx 来禁用X插件。
参考: https:///net/201812/