LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How do I allow mysql connections over network (netstat -an | grep 3306 produces nil)? (https://www.linuxquestions.org/questions/linux-software-2/how-do-i-allow-mysql-connections-over-network-netstat-an-%7C-grep-3306-produces-nil-201094/)

jdruin 07-04-2004 03:26 PM

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?

david_ross 07-04-2004 03:44 PM

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.

jdruin 07-05-2004 02:48 AM

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.

HollywoodMarks 02-01-2013 12:16 PM

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.

genel 04-02-2013 09:28 PM

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. :(

chrism01 04-02-2013 10:25 PM

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.

Habitual 04-03-2013 10:35 AM

Quote:

Originally Posted by jdruin (Post 1027769)
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


All times are GMT -5. The time now is 09:15 AM.