[SOLVED] mysql fails to start up on different port
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm using Fedora 15, disabled my firewall and installed mysql server 5.5.14
I'm trying to get mysql to listen on port 3315 instead of the default 3306.
When I include the variable port=3315 in the /etc/my.cnf file, mysql fails to start up. The /var/log/mysqld.log logs the following:
111202 13:28:52 [ERROR] Can't start server: Bind on TCP/IP port: Permission denied
111202 13:28:52 [ERROR] Do you already have another mysqld server running on port: 3315 ?
111202 13:28:52 [ERROR] Aborting
However there is nothing running on port 3315, the following returns nothing:
netstat -antpd | grep 3315
When I remove the port=3315 variable from the my.cnf, mysql starts up fine on port 3306 and I can connect on port 3315 as well.
netstat -antpd | grep mysql
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 3569/mysqld
Please help me figure out why mysql doesn't want to listen on port 3315. Thanks.
Before you dig too deep into this, do you have your firewall configured to allow traffic on port 3315? This may be an issue, especially if you have a defaulting reject or drop for your iptables.
Thanks Bathory, I ran the command
sudo /usr/sbin/semanage port -a -t mysqld_port_t -p tcp 3315
and this solved my problem.
You guys rock!!! Thanks a mil.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.