[mythtv-users] Neebie Help Please!! Mandriva 2006 mysqld and mysql neither working

R. G. Newbury newbury at mandamus.org
Tue Sep 26 17:18:40 UTC 2006

scott at tbwifi.ca wrote:
>>     Quoting scott at tbwifi.ca:
>>    > I have been trying to deal with problems that I am having with
>> MySQL on
>>> Mandriva 2006. 
> Thanks for the reply...
> Is server running --> mysqld dead but subsys locked
> Attempt to login  --> ERROR 2002: Can't connect to local MySQL server     
>          through socket '/var/lib/mysql/mysql.sock' (2)

There's your problem. The daemon is not running. If you try 'service 
mysqld restart' as a user you will probably get a 'permission denied' 
error. If you do that as root, the restart will clear the 
/var/lock/mysqld lockfile. Check if an immediate 'service mysqld status' 
works. If that fails, giving the same error, then your installation of 
mysql is bad somehow or possibly, the my.cnf file is set up incorrectly.

The login error is normal if the server is not running since of course, 
the client, mysql, would not be able to communicate with the server, 
mysqld, through the socket, when the server is not running.

The following is written from a Fedora point of view: Mandriva may use 
different names/folders.

There may be a problem with the file which starts mysqld. I cannot 
remember how its done in Mandriva, but in Fedora, the files are in 
/etc/init.d and often refer to files in /etc/sysconfig. The init script 
file calls the actual binary file. Check the path given for that.
mysqld needs networking set up to work at all, so check that /etc/hosts 
has a localhost line and that 'ping localhost' works. the 
script also parses the /etc/my.cnf file, so check it too.

> Logs --> assuming that you mean /var/log/mysqld/mysqld.log...it is empty

Sounds like mysqld never runs. Check the items listed above.
You can also try stopping mysqld with 'service mysqld stop' and then 
running '/usr/bin/mysqld_safe &&' from a command line as root. This 
bypasses all the init scripts. The 'stop' should clear away any 
leftovers. Then you should see:
[root at tor2 usr]# mysqld_safe
Starting mysqld daemon with databases from /var/lib/mysql

If that works, then its the init script setup.
You may need to use 'ps -ae' to see the pid and then 'kill -9 "pid"' 
twice to  kill the 2 daemon processes when you are done.

> I have already uninstalled and reinstalled a few times and even installed
> an older version of mysql thinking that was the problem. 

Mysql needs some steps to be taken besides the actual code install. I 
suspect that you have never taken those extra steps or that one of them 
is wrong somehow so that mysqld never runs properly.

  I also deleted
> the files in the mysql directory thinking that the permissions file my
> offering some trouble with logging in.  I did that before a fresh
> re-installation.  Perhpas I corrupted something.  Note that the only way a
> can seem to clear things up after trying to start up the server
> unsuccessfully is with a reboot.  I'm sure that's just the newbee talking.
>  Surely there is another method.  Anyhow, I'm still hanging and any
> further advice is definitely appreciated.  BTW the database is emply as I
> haven't been able to log in to configure it yet.

If you have the code installed, and the other steps have been properly 
taken, you should end up with a /var/lib/mysql/mysql folder and a 
/var/lib/mysql/test folder. The latter is empty. The first thing that 
the mythtv my.sql script does, is create a mythtv user in the user table 
of the mysql database. Later that user will create the mythconverg 
database. It appears you have never gotten anywhere near those steps.

Since your installation is blotto anyway, you might as well step up to 
the latest mysql 5.1. Download the reference manual and read the 
installation section, Also refer to Appendix B which give lots of 
answers to questions of the sort "Why won't my install ....?"

              R. Geoffrey Newbury			

        Helping with the HTTP issue
<a href="http://www.w3.org/Protocols/">HTTP</a>

More information about the mythtv-users mailing list