Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 10-15-2005, 07:09 AM   #1
Registered: Feb 2004
Posts: 30

Rep: Reputation: 15
Unable to connect to (working) mySQL database

I have a mySQL 5 database running on a Debian 3.0 install. I can connect to it fine via:

mysql -u root -p

I can connect to it fine using PHP's mySQL modules.

But I cannot connect to it all through TCP. And yes, I have commented out the "Skip Networking" directive in my.cnf.

When I try:

telnet localhost 3306

I get:

host0447:/var/www# telnet localhost 3306
Connected to localhost.localdomain.
Escape character is '^]'.
Connection closed by foreign host.

So, it is listening; it just doesn't seem to want to deal with TCP connections.

I've googled for this issue but seem to be being very clueless. Does anyone have any suggestions.

(I am not running iptables.)

Many thanks,

Old 10-16-2005, 08:23 AM   #2
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Do you mean that you can't connect to it from localhost or you can't connect to the server from a seperate client machine?

What error do you get when you try?

Can you post the output from:
iptables -nL
netstat -nlp


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
cannot connect to mysql database from php rocordial Linux - Software 2 08-21-2005 03:05 PM
cannot connect to mysql database externally lsimon4180 Linux - Software 17 03-02-2005 01:28 PM
PHP:Unable to post variables from html form to mysql database vikram_cvk Linux - Software 1 09-29-2004 04:01 PM
cannot connect to mysql database mrosati Linux - Software 19 07-15-2004 03:40 PM
Embedded SQL -Unable to connect to PostgreSQL database vikram_cvk Linux - Software 1 05-30-2004 07:14 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:25 PM.

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