Modify the MySQL port to 13306
Vim/etc/my.cnf
[Mysqld]
port=13306
Lower_case_table_names=1
Datadir=/var/lib/mysql
Socket=/var/lib/mysql/mysql.sock
User=mysql
# Disabling Symbolic-links is recommended to prevent assorted security risks
Symbolic-links=0
[Mysqld_safe]
Log-error=/var/log/mysqld.log
Pid-file=/var/run/mysqld/mysqld.pid
/etc/init.d/mysqld start
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
Log error
180402 13:07:25 mysqld_safe mysqld from PID File/var/run/mysqld/mysqld.pid ended
180402 13:13:19 Mysqld_safe starting mysqld daemon with databases From/var/lib/mysql
180402 13:13:19 innodb:initializing buffer pool, size = 8.0M
180402 13:13:19 innodb:completed initialization of buffer pool
180402 13:13:19 innodb:started; Log sequence number 0 44233
180402 13:13:19 [ERROR] Can ' t start server:bind on TCP/IP port:permission denied
180402 13:13:19 [ERROR] Do you already has another MYSQLD server running on port:13306?
180402 13:13:19 [ERROR] Aborting
180402 13:13:19 innodb:starting shutdown ...
180402 13:13:24 Innodb:shutdown completed; Log sequence number 0 44233
180402 13:13:24 [Note]/usr/libexec/mysqld:shutdown complete
1. Workaround
Vim/etc/sysconfig/iptables
-A input-m state--state new-m tcp-p TCP--dport 13306-j ACCEPT
The first method is to open the external network port, the second method is used for local boot;
Do not write firewall policy, cannot Access database remotely
2. Turn off SELinux issues
Method One: Do not need to restart Linux:
[Email protected] ~]# Setenforce 0
Method Two: Need to restart Linux:
Vi/etc/selinux/config
Selinux=disabled
Unable to restart after modifying MySQL port