I Just installed mysql-3.23.36-1.i386.rpm, mysqlclient9-3.23.22-4.i386rpm and mysql-server-3.23.36-1.i386rpm over Redhat 7.1. I followed instructions both in Redhat's manual and http://www.mysql.com/doc/P/o/Post-installation.html, following links to and reading 2.4.2 Problems Starting the MySQL Server including the comments section.

So, backing up a bit, after successfully intalling the grant tables, I tried to start the server from /usr/bin with "safe_mysqld &".
A message came back:
[root@gopala bin]# Starting mysql daemon with databases from /var/lib/mysql
010815 08:55:47 mysql ended
and the curser froze. I hit return and got the message:
[1]+Done safe_mysql.

To just check to see if the server is running anyway, I entered "mysqladmin version". Message came back:
[root@gopala bin]# mysqladmin version
mysqladmin: connect to server at 'localhost' failed.
error: Can't connect to local MySQL server through socket '/var/lib/mysql.sock (111)
Check that mysql is running and that the socket (same as above) exists.

Checked /var/lib/mysql/mysql.sock. It exists with permissions: srwxrwxrwx.

Thinking that I may have installed the packages wrong, I uninstalled and reinstalled and rebooted.

After reboot, used "service httpd start" and got message back that MySQL started.

Verifying, I again entered "mysqladmin version" and got back the same messages as the last time I verified, i.e. connect to server at 'localhost' failed.
error: Can't connect to local MySQL server through socket '/var/lib/mysql.sock (111)
Check that mysql is running and that the socket (same as above) exists.

From a search, I found a post on this site that suggested the new version has a placement of mysqld elsewhere than the original install. The suggested kludge fix was to create a LINK from where the old mysql.sock file was to where the new file is. However, when I do it, I get a message that the file already exists! As follows:

[paulcj2@gopala paulcj2]$ ln -s /var/mysql.sock /var/lib/mysql/mysql.sock
ln: `/var/lib/mysql/mysql.sock': File exists

Not sure why this is happening and the link is not forming.

Is there some other configuration, not mentioned in the docs, that I must deal with to allow mysql.sock to accept connections?
Any clues as to what's going on?

    2 months later

    I had this exact same problem. I tried everything I could think of to get the damn thing working, but all to no avail. Eventually I uninstalled the rpm and installed the latest version of mysql from source code (3.23.38 I think it was back then).

    When you install mysql from rpm, it installs the files in a completely different directory to where the source and binary packages ask to be installed by default (don't see why this should be a problem, but I'm not a guru and this did work for me).

    Probably not the happy ending you were lookin for, but I hope it helps.

    Cheers, Ben

      3 months later

      I have also had this problem, I've been looking all over for a solution.

      I have seen many different answers to this problem. According to a response on another list;
      http://lists.q-linux.com/pipermail/ph-linux-newbie/2001-October/003928.html
      the 'Right Way' is to start and stop mysql using initscript in /etc/rc.d/init.d

      The following worked for me:
      su root
      cd /etc/rc.d/init.d
      ./mysqld start
      Matt

        a month later

        Thank you Mat. I had exactly the same problem but thanks to you it worked. Thank you very much :-)

          20 days later
          Write a Reply...