LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 03: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, 03:44 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
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, 02: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, 12: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, 09: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, 10:25 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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, 10:35 AM   #7
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:19 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