CentOS MySQL Modify port

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.