You are not logged in.

#1 2011-03-14 08:57:05

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 616

MySQL: via socket only, not TCP/IP

Hi!

mysqld is listening to a port:

$ netstat -tln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      
tcp        0      0 0.0.0.0:8010            0.0.0.0:*               LISTEN      
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      
tcp        0      0 ::1:631                 :::*                    LISTEN

I can log in via socket:

$ mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.5.9-log Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> quit
Bye

... but not via TCP/IP:

$ mysql --host 127.0.0.1 -u root -p
Enter password: 
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0

Where to dig in?

Last edited by student975 (2011-03-14 08:59:58)


"I exist" is the best myth I know..

Offline

#2 2011-03-14 10:26:53

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 616

Re: MySQL: via socket only, not TCP/IP

Have found. Added to  /etc/hosts.allow

mysqld: 127.0.0.1: ALLOW

Sorry for noise.


"I exist" is the best myth I know..

Offline

Board footer

Powered by FluxBB