mysql5 7配置不生效解决记录

423 阅读1分钟

mysql更改默认端口不生效

  • 默认端口3306 更改 /etc/my.cnf 里面的端口为自定义端口

  • 重启 /etc/init.d/mysqld restart

  • 查看端口 netstat -apn | grep 端口

  • 此时生效端口为3306

  • 执行setenforce 0

  • 再次重启,生效