LinuxQuestions.org
Help answer threads with 0 replies.
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
 
LinkBack Search this Thread
Old 07-08-2005, 02:21 PM   #1
Waerner
Member
 
Registered: May 2005
Location: Írebro, Sweden
Distribution: Ubuntu 6.06
Posts: 92

Rep: Reputation: 15
MySQL over TCP?


Hello, I've tried to reach my MySQL-server for a long time now - using remote tools like Query Browser and Administrator, but I can't get the TCP-connections to work, I've looked around in the whole filesystem for config files, and the one I've found is my.cnf.

Does anyone know how I can get this thing work?
 
Old 07-08-2005, 02:29 PM   #2
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
What is it that you are trying to do exactly? Manage your MySQL databases using a web front-end? If so, I've always used http://www.phpmyadmin.net and has worked fine for me. If not, then what was it you're trying to do?
 
Old 07-08-2005, 03:55 PM   #3
twsnnva
Member
 
Registered: Oct 2003
Location: Newport News, Va
Distribution: Debian
Posts: 246

Rep: Reputation: 30
Waerner,
There is an option in my.cnf called skip-networking. Make sure you comment this out and restart mysql or remote hosts will not be able to connect to the mysql server. I've seen this be the culprit several times, so I just thought I'd mention it.
 
Old 07-13-2005, 12:01 PM   #4
Waerner
Member
 
Registered: May 2005
Location: Írebro, Sweden
Distribution: Ubuntu 6.06
Posts: 92

Original Poster
Rep: Reputation: 15
twsnnva,

I'm trying to connect to the MySQL-server (192.168.0.10) from my computer (192.168.0.1) - using MySQL Query Browser.

I did what you told me to, I added an # in the front of the "Skip-networking" in /etc/mysql/my.cnf, and rebooted the whole computer.
And when I try to connect now (from 192.168.0.1) I get the reply:

Could not connect to the specified instance.

MySQL Error Number 1130
Host '192.168.0.1' is not allowed to connect to this MySQL server.


Do I need to grant access for using network connections to the used account (Root)?

Last edited by Waerner; 07-13-2005 at 12:09 PM.
 
Old 07-13-2005, 06:46 PM   #5
twsnnva
Member
 
Registered: Oct 2003
Location: Newport News, Va
Distribution: Debian
Posts: 246

Rep: Reputation: 30
Yeah, most distros disable root access from everywhere but localhost. Mysql stores all of the user info in a database called mysql. It's simple to change.

On the server running mysql, enter the mysql command line, and verify that root is only allowed to login from localhost.

Code:
thunder:~# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 801 to server version: 4.0.24_Debian-10-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> SELECT Host FROM user WHERE User = 'root';
+-----------+
| Host      |
+-----------+
| localhost |
+-----------+
1 row in set (0.00 sec)
Removing localhost will allow root to login from anywhere.
Code:
mysql> UPDATE user SET Host='' where User='root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0
Now verify that localhost is gone, and quit.
Code:
mysql> SELECT Host FROM user WHERE User = 'root';
+------+
| Host |
+------+
|      |
+------+
1 row in set (0.00 sec)

mysql> exit
Bye
thunder:~#
You may need to restart mysql, but that should do the trick.
 
Old 07-13-2005, 07:40 PM   #6
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,051

Rep: Reputation: 954Reputation: 954Reputation: 954Reputation: 954Reputation: 954Reputation: 954Reputation: 954Reputation: 954
You will probably find a log-file in /var/log or somesuch that will tell you more. There are a few general scenarios to sort between:
  • The message isn't getting out... a firewall's blocking it.
  • The SQL server has been told to ignore you; perhaps it's not supposed to listen to anyone "outside."
  • The SQL server doesn't recognize your login from that machine.
The latter two points are the purview of my.cnf adjustments. The logs should tell all. A ping to the IP-address and port that you think you can connect to will quickly tell you if you can, in fact, "get there at all."
 
Old 07-13-2005, 08:05 PM   #7
Waerner
Member
 
Registered: May 2005
Location: Írebro, Sweden
Distribution: Ubuntu 6.06
Posts: 92

Original Poster
Rep: Reputation: 15
It all went easy and smooth by doing exactly what twsnnva wrote

Thanks alot mate(s)
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Woody 3.0 Open Ports 1470/tcp/uaiact 1518/tcp/vpvd What for?How can I remove them? alexxxis Debian 5 07-05-2004 05:18 PM
MySQL connection over TCP/IP fails Rukawa Linux - Software 4 11-29-2003 11:30 PM
MySQL seg fault using TCP connection ugenn Linux - General 1 12-27-2002 03:15 PM
close port 6000/tcp 515/tcp SchwipSchwap Linux - Newbie 1 09-12-2002 08:24 AM
MySQL on Debian 3.0: TCP listening Hko Linux - Software 3 09-04-2002 02:28 PM


All times are GMT -5. The time now is 07:10 PM.

Main Menu
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