[mythtv-users] MySQL remote access not possible

Ramon Hofer ramonhofer at bluewin.ch
Fri May 27 21:59:21 UTC 2011


Hi all

I'm trying to install MythTV Backend on Debian Squeeze.
After installing the base system with SSH access I install mysql-server.
There's no problem. I can reboot and there's no error message.

But when I simply change the bind-address to the system's IP address and 
then reboot I get an error message when mysqld should be started.

Of course I can't login:

$ mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
'/var/run/mysqld/mysqld.sock' (2)


But after restarting mysql there's no problem to connect.

$ sudo /etc/init.d/mysql restart
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld.
Checking for corrupt, not cleanly closed and upgrade needing tables..

$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 35
Server version: 5.1.49-3 (Debian)
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input 
statement.
mysql>

And when I try to connect with the option -h and the IP address it 
doesn't work
$ mysql -u root -h 192.168.1.6 -p
Enter password:
ERROR 1130 (HY000): Host '192.168.1.6' is not allowed to connect to this 
MySQL server


Unfortunately I can't access the database from my frontends as well.

Maybe there's a problem with the permissions?

$ ls -la /var/run/mysqld/
total 12
drwxr-xr-x 2 mysql root  4096 May 27 23:47 .
drwxr-xr-x 6 root  root  4096 May 27 23:46 ..
-rw-rw---- 1 mysql mysql    5 May 27 23:47 mysqld.pid
srwxrwxrwx 1 mysql mysql    0 May 27 23:47 mysqld.sock


All the mysql logs are empty:

$ sudo ls -l /var/log/mysql*
-rw-r----- 1 mysql adm    0 May 27 23:28 /var/log/mysql.err
-rw-r----- 1 mysql adm    0 May 27 23:28 /var/log/mysql.log

/var/log/mysql:
total 0

mysql:
total 0



This is the end of my syslog after reboot:

May 27 23:39:57 media-server mysqld_safe: Starting mysqld daemon with 
databases from /var/lib/mysql
May 27 23:39:57 media-server mysqld: 110527 23:39:57 [Note] Plugin 
'FEDERATED' is disabled.
May 27 23:39:57 media-server mysqld: 110527 23:39:57  InnoDB: Started; 
log sequence number 0 44233
May 27 23:39:57 media-server mysqld: 110527 23:39:57 [ERROR] Can't start 
server: Bind on TCP/IP port: Cannot assign requested address
May 27 23:39:57 media-server mysqld: 110527 23:39:57 [ERROR] Do you 
already have another mysqld server running on port: 3306 ?
May 27 23:39:57 media-server mysqld: 110527 23:39:57 [ERROR] Aborting
May 27 23:39:57 media-server mysqld:
May 27 23:39:57 media-server mysqld: 110527 23:39:57  InnoDB: Starting 
shutdown...
May 27 23:39:58 media-server dhclient: DHCPDISCOVER on eth0 to 
255.255.255.255 port 67 interval 6
May 27 23:39:59 media-server kernel: [   16.198181] e1000e: eth0 NIC 
Link is Up 1000 Mbps Full Duplex, Flow Control: RX
May 27 23:39:59 media-server kernel: [   16.199951] 
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
May 27 23:40:03 media-server mysqld: 110527 23:40:03  InnoDB: Shutdown 
completed; log sequence number 0 44233
May 27 23:40:03 media-server mysqld: 110527 23:40:03 [Note] 
/usr/sbin/mysqld: Shutdown complete
May 27 23:40:03 media-server mysqld:
May 27 23:40:03 media-server mysqld_safe: mysqld from pid file 
/var/run/mysqld/mysqld.pid ended
May 27 23:40:04 media-server dhclient: DHCPDISCOVER on eth0 to 
255.255.255.255 port 67 interval 7
May 27 23:40:04 media-server dhclient: DHCPOFFER from 192.168.1.2
May 27 23:40:04 media-server dhclient: DHCPREQUEST on eth0 to 
255.255.255.255 port 67
May 27 23:40:04 media-server dhclient: DHCPACK from 192.168.1.2
May 27 23:40:04 media-server dhclient: bound to 192.168.1.6 -- renewal 
in 1774 seconds.
May 27 23:40:09 media-server kernel: [   26.272161] eth0: no IPv6 
routers present
May 27 23:40:11 media-server /etc/init.d/mysql[1848]: 0 processes alive 
and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' 
resulted in
May 27 23:40:11 media-server /etc/init.d/mysql[1848]: 
#007/usr/bin/mysqladmin: connect to server at 'localhost' failed
May 27 23:40:11 media-server /etc/init.d/mysql[1848]: error: 'Can't 
connect to local MySQL server through socket 
'/var/run/mysqld/mysqld.sock' (2)'
May 27 23:40:11 media-server /etc/init.d/mysql[1848]: Check that mysqld 
is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
May 27 23:40:11 media-server /etc/init.d/mysql[1848]:


I really got stuck here and I hope you can help me with that.


Best regards
Ramon


More information about the mythtv-users mailing list