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_passwordport = 3306socket = /var/run/mysqld/mysqld.sock

It looks like mysql is not actually running. The cmd ps ax | grep mysql should also show a /usr/bin/mysqld process that is spawned by mysqld_safe. Since sv runs mysqld_safe that is why sv status shows it is running.

A couple of things to do:- Use df -h | grep mysql and make sure your sql partition isn't full- Check the end of the error file: sudo less /data/srv/mysql/mythtv.err

It looks like mysql is not actually running. The cmd ps ax | grep mysql should also show a /usr/bin/mysqld process that is spawned by mysqld_safe. Since sv runs mysqld_safe that is why sv status shows it is running.

A couple of things to do:- Use df -h | grep mysql and make sure your sql partition isn't full- Check the end of the error file: sudo less /data/srv/mysql/mythtv.err

Thank you for these suggestions. The output of the first command above is the following.

Quote:

df -h | grep mysql/dev/sda6 1.9G 1.8G 0 100% /data/srv/mysql

Thus, it appears that /dev/sda6 is completely full.

I am unfamiliar with /data/srv/mysql, so I listed the contents of this directory.

Right, I forgot that the mysql .err files is based on the hostname. So I am guessing your hostname is linhes?

First stop mysql: sudo sv stop mysqlThen move the linhes.err file to another disk/partition since it is so large and is taking up 70% of the mysql partition. It will be recreated when mysql is next started.Also check /data/srv/mysql/mythconverg for any *.TMD files. These are mysql temp files that may not have been cleaned up when you lost power. Rename them or move them to another disk. I have found that these TMD files can keep the optimize and repair operations from running. After the db is repaired you can delete these TMDs.Start mysql: sudo sv start mysql and check the .err file or use ps to see if mysql is running.If no errors you should be able to sudo sv restart mythbackend and be back in business.I would also run optimize_mythdb.py.

Right, I forgot that the mysql .err files is based on the hostname. So I am guessing your hostname is linhes?

First stop mysql: sudo sv stop mysqlThen move the linhes.err file to another disk/partition since it is so large and is taking up 70% of the mysql partition. It will be recreated when mysql is next started.Also check /data/srv/mysql/mythconverg for any *.TMD files. These are mysql temp files that may not have been cleaned up when you lost power. Rename them or move them to another disk. I have found that these TMD files can keep the optimize and repair operations from running. After the db is repaired you can delete these TMDs.Start mysql: sudo sv start mysql and check the .err file or use ps to see if mysql is running.If no errors you should be able to sudo sv restart mythbackend and be back in business.I would also run optimize_mythdb.py.

Thank you so much! I was going to use optimize_mythdb.py to repair the mysql database tables. Is there a better command to repair?

Right, I forgot that the mysql .err files is based on the hostname. So I am guessing your hostname is linhes?

First stop mysql: sudo sv stop mysqlThen move the linhes.err file to another disk/partition since it is so large and is taking up 70% of the mysql partition. It will be recreated when mysql is next started.Also check /data/srv/mysql/mythconverg for any *.TMD files. These are mysql temp files that may not have been cleaned up when you lost power. Rename them or move them to another disk. I have found that these TMD files can keep the optimize and repair operations from running. After the db is repaired you can delete these TMDs.Start mysql: sudo sv start mysql and check the .err file or use ps to see if mysql is running.If no errors you should be able to sudo sv restart mythbackend and be back in business.I would also run optimize_mythdb.py.

brfransen - Your instructions worked. Thank you so much. Below is a bit more information.

Who is online

Users browsing this forum: No registered users and 4 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum