[mythtv-users] Mythweb install error: Can't connect to local MySQL server through socket

Andy Whitworth andywhit at gmail.com
Thu Jan 20 18:18:35 EST 2005


Hi,

Trying to get MythWeb up and running but when I point the browser at the
homepage then I get:-

Warning at /var/www/html/mythweb/includes/init.php, line 63:
mysql_connect(): Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (13) Fatal Error at
/var/www/html/mythweb/includes/init.php, line 64:
Can't connect to the database server. Did you use the correct settings
in config/conf.php?

The system administrator has been notified and the problem will be
remedied shortly.
=================================

conf.php has the following Db entries:-

    define('db_host',     'localhost');
    define('db_username', 'mythtv');
    define('db_password', 'mythtv');
    define('db_dbname',   'mythconverg');
===================================

I can connect to the Db on the command line:-

[andy at localhost ~]$ mysql -umythtv -pmythtv mythconverg
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 74 to server version: 3.23.58

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

mysql> select count(*) from channel;
+----------+
| count(*) |
+----------+
|       25 |
+----------+
1 row in set (0.00 sec)

mysql>

=================================

The socket mentioned in the error exists:-

[andy at localhost ~]$ ls -l /var/lib/mysql/mysql.sock
srwxrwxrwx  1 mysql mysql 0 Jan 20 21:02 /var/lib/mysql/mysql.sock
==================================
mysqld is running:-

[andy at localhost includes]$ ps -ef|grep mysql
root      4018     1  0 21:02 ?        00:00:00 /bin/sh
/usr/bin/safe_mysqld --defaults-file=/etc/my.cnf
mysql     4042  4018  0 21:02 ?        00:00:05 /usr/libexec/mysqld
--defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql
--user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking
===================================


I'm stumped!

I've tried installing phpmyadmin also and it gives the same socket error.

Any ideas ?

FC3, Myth 0.16, MythWeb 0.16, mysql  Ver 11.18 Distrib 3.23.58, for
redhat-linux-gnu (i386)

Andy.


More information about the mythtv-users mailing list