Hello,
First, I want to thank all those who helped me solve previous problems. I try to provide details to the problem, as well as the solution.
My current problem occurred after a power loss and the system (frontend and backend on the same machine).
When we boot up LinHES (8.5 I think), a screen appears titled 'MythTV Startup Status' and the message 'Unable to connect to Database. Select an option below'. The message seems to indicate the mythbackend cannot communicate to the mysql database.
Note: I am able to access the mythtv machine across the network.
I verified that the contents of /etc/mysql/my.cnf is correct.
Quote:
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /var/run/mysqld/mysqld.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port = 3306
socket = /var/run/mysqld/mysqld.sock
datadir = /data/srv/mysql
The contents of /home/mythtv/.mythtv/config.xml also looks correct.
Quote:
<LocalHostName>my-unique-identifier-goes-here</LocalHostName>
<Database>
<UserName>mythtv</UserName>
<PingHost>0</PingHost>
<Host>192.168.0.151</Host>
<DatabaseName>mythconverg</DatabaseName>
<Password>mythtv</Password>
<Port>3306</Port>
</Database>
This file also appears in a few other locations (/usr/share/mythtv/contrib/config_files/config.xml and /usr/share/mythtv/config.xml; however, the content looks as it should.
I can verify that mysql server is running with the command...
Quote:
sudo sv status mysql
run: mysql: (pid 967) 3810s
If I run this command for mysql, the output is...
Quote:
ps ax | grep mysql
943 ? Ss 0:00 runsv mysql
1636 ? R 22:43 /bin/sh usr/bin/mysqld_safe --user=mysql
22907 pts/3 S+ 0:00 grep mysql
Is the above normal output?
At first I thought the database might be corrupted, so I tried to optimize/repair.
Quote:
sudo /usr/share/mythtv/contrib/maintenance/optimize_mythdb.pl
DBI connect('database=mythconverg:host=192.168.0.151;port=3306','mythtv',...) failed: Can't connect to MySQL server on '192.168.0.151' (111) at /usr/share/perl5/site_perl/MythTV.pm line 373.
Cannot connect to database:
The following alternative command has similar output.
Quote:
sudo /usr/bin/mysqlcheck mythconverg
/usr/bin/mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
The above commands give a clue to the problem. I checked the permissions of /var/run/mysqld, which appears correct.
Quote:
drwxr-xr-x 2 mysql mysql 40 May 27 19:25 mysqld
I have run out of ideas on a next step.
I will appreciate any help with re-connecting mysql to mythtvbackend.
