LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 07-04-2004, 04:26 PM   #1
jdruin
Member
 
Registered: Jul 2003
Location: Louisville aka Derby City
Distribution: WinXP SP2 and SP3, W2K Server, Ubuntu
Posts: 313

Rep: Reputation: 30
How do I allow mysql connections over network (netstat -an | grep 3306 produces nil)?


How do I allow mysql connections over network ? I did a

netstat -an | grep 3306

and got nothing. I think this means mysql is not listening to external connections but I am not sure. Also how do I check to see which connections mysql is listening on. For example, canI use netstat to see if mysql is listening on localhost? THe bigger problem is how do I tell mysql to listen for connections from my network?
 
Old 07-04-2004, 04:44 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
Try creating a section like the following in /etc/my.cnf (or just add the port option if the mysqld section exists):
Quote:
[mysqld]
port = 3306
Also make sure that there is no "skip-networking" option.
 
Old 07-05-2004, 03:48 AM   #3
jdruin
Member
 
Registered: Jul 2003
Location: Louisville aka Derby City
Distribution: WinXP SP2 and SP3, W2K Server, Ubuntu
Posts: 313

Original Poster
Rep: Reputation: 30
Thanks david_ross. You gave me the push I needed.

For those reading for solution:

What I did is found the my.cnf in /etc/mysql/my.cnf and opened it after installing nano editor. Here are the steps:

I got nano (my favorite editor) from www.nano-editor.org/ for Debian ( I am using Xandros)

I loaded nano using dpkg -i nano*

I commented out a line in my.cnf that reads "skip-networking" about 47 lines into file.
 
Old 02-01-2013, 01:16 PM   #4
HollywoodMarks
LQ Newbie
 
Registered: Feb 2013
Posts: 2

Rep: Reputation: Disabled
Thumbs up Old, but still helpful

This may be an old thread, but it helped me to figure out why I couldn't connect using MySQL Workbench to work on my mysql db.
 
Old 04-02-2013, 10:28 PM   #5
genel
LQ Newbie
 
Registered: Apr 2013
Posts: 1

Rep: Reputation: Disabled
The option has changed

This helped me figure out my problem too. However, the line in my.cnf that needs to be removed is now:
bind-address = 127.0.0.1

This limits the server to only work on the loop back connector.

For the life of me, I can't figure out why you would want a server configured this way. I sat up a server on Windows, it was running seconds; on Debian a day later and its still not right.
 
Old 04-02-2013, 11:25 PM   #6
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
Its a security issue; several services like MySQL, sendmail etc are installed like this so you've got time to test it & secure it PROPERLY before you open it up to the world.
 
Old 04-03-2013, 11:35 AM   #7
Habitual
Senior Member
 
Registered: Jan 2011
Distribution: Undecided
Posts: 3,618
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by jdruin View Post
How do I allow mysql connections over network ? I did a

netstat -an | grep 3306

and got nothing. I think this means mysql is not listening to external connections but I am not sure. Also how do I check to see which connections mysql is listening on. For example, canI use netstat to see if mysql is listening on localhost? THe bigger problem is how do I tell mysql to listen for connections from my network?
Code:
msyql > grant all privileges on dbName.* to user@'somehost' identified by 'secret_password'; flush privileges
see http://dev.mysql.com/doc/refman/5.6/en/grant.html and/or http://search.oracle.com/search/sear...ty&group=MySQL
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 not listening on port 3306 mr_sarge Linux - Newbie 14 12-03-2013 05:17 AM
2000 MySQL connections, still "too many connections" newlinuxnewbie Linux - General 0 11-07-2005 02:03 PM
mysqld running and reading for connections on port 3306, no port 3306 found from scan darkenigmaa Linux - Networking 7 09-21-2005 11:10 AM
mysql 3306 security sopiaz57 Linux - Security 8 03-07-2004 05:32 PM
mysql port 3306 bulliver Linux - Security 4 04-17-2003 09:00 PM


All times are GMT -5. The time now is 07:48 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration