http://blog.csdn.net/wobin/article/details/10266165
After installing MySQL using the Yum command on CentOS, the default port 3306 can be used to start successfully, but in the/etc/my.cnf, the MySQL boot is unsuccessful and the following information is summarized as follows:
This is the log of startup failures that have been picked in/var/log/mysqld.log after the port is changed:
130823 17:21:14 Mysqld_safe starting mysqld daemon with databases From/var/lib/mysql
130823 17:21:14 [Warning] '--default-character-set ' is deprecated and'll be removed in a future release. Please use '--character-set-server ' instead.
130823 17:21:14 innodb:initializing buffer pool, size = 8.0M
130823 17:21:14 innodb:completed initialization of buffer pool
130823 17:21:14 innodb:started; Log sequence number 0 44233
130823 17:21:14 [ERROR] Can ' t start server:bind on TCP/IP port:permission denied
130823 17:21:14 [ERROR] Do you already has another MYSQLD server running on port:8060?
130823 17:21:14 [ERROR] Aborting
130823 17:21:14 innodb:starting shutdown ...
130823 17:21:19 Innodb:shutdown completed; Log sequence number 0 44233
130823 17:21:19 [Note]/usr/libexec/mysqld:shutdown complete
Resolved as follows:
1. Firewall issues
Vi/etc/sysconfig/iptables
Add the following line:
-A input-m state--state new-m tcp-p TCP--dport 8060-j ACCEPT
2. 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
CentOS MySQL Modify port