LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-05-2011, 02:31 AM   #1
tuxstar
LQ Newbie
 
Registered: Jan 2007
Posts: 4

Rep: Reputation: 0
Unhappy mysql fails to start up on different port


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

telnet localhost 3315
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused


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.
 
Old 12-05-2011, 02:36 AM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
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.

Cheers,

Josh
 
1 members found this post helpful.
Old 12-05-2011, 11:02 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Since you're running Fedora, this looks like a SELinux problem
Have a look here to see what you need to do

Regards
 
1 members found this post helpful.
Old 12-06-2011, 12:02 AM   #4
tuxstar
LQ Newbie
 
Registered: Jan 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Thumbs up It's fixed.

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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL (mysqld) fails to start! dot_pro Linux - Server 1 09-27-2011 02:56 PM
[SOLVED] mysql server fails to start on Fedora 15 previously was OK. Solved nerak99 Linux - Server 1 07-27-2011 08:14 PM
Problem changing mysql uid,gid: mysql start fails gjatute Linux - Newbie 7 02-25-2010 01:38 AM
MySQL Server fails to start after hdd was full Floix Linux - Server 3 09-18-2009 06:59 PM
MySQL fails to start after loading dumped InnoDB database timhilliard Linux - Newbie 3 03-25-2009 07:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration