top

Linux修改mysql端口加固服务器安全

以下用debian9为示例
操作如下:
输入mysql
登录Mysql后,查看当前端口命令
mysql> show global variables like ‘port’;
vi /etc/my.cnf 

找到这行[mysqld]   修改端口为3301
port=3301
重新启动mysql,执行下方命令
service mysql restart
再次登录后检查端口已修改为’3301’.
mysql> show global variables like ‘port’;
THE END
icon
0
icon
分享
icon
二维码
发表评论
评论列表

赶快来坐沙发