i have looked over almost all the related threads, and tried several things, but nothing has worked, so i need to post my specific problem. first of all, i have a clean version of red hat 7.1 installed.

when i try to run mysql, it says:
cant connect to local mysql server through socket /var/lib/mysql/msyql.sock.
i tried making a symbolic link from that dir to /tmp just in case, but it did not work.

when i try to start the mysql server with safe_mysqld &, it gives me this:
starting mysqld daemon with databases from /var/lib/mysql
...mysqld ended

when i look at the hostname.err file, it says:
mysqld started
/usr/libexec/mysqld: cant find file: ./mysql/host.frm (errno: 13)
...mysqld ended

does anyone have some good suggestions to get this damn program up and running?? i would appreciate any attempts to help. -thanks

    update my.cnf to reflect the current location of mysql.sock. check the permissions of the directory & file for mysql.sock

    run the mysql_install_db script.

    set the root account password for mysql just like mysql_install_db says towards the end.

    read the docs on the www.mysql.com web page.

      i have already been to my.cnf and everything there points t o the right path, and mysql.sock has been chmod 777'ed to all permissions.

      mysql_install_db has already been ran, and it went fine.

      when i set the root account password, with: mysqladmin -u root -h <hostname> -p <password> , it says: cannot connect to server etc.... make sure that the server is running, and that the port is 3306. you can do this by telnet <hostname> 3306.

      when i telnet 3306, it says:
      trying 127.0.0.1...
      unable to connect to remote host: connection refused

      any more ideas??

        this is a permissions issue on the DIRECTORY of the mysql.sock & mysql database files.

        /usr/libexec/mysqld returned error 13, so run "perror 13" to see what error 13 means.

          you are a god damn genius my friend. i chmod 777ed everything in the dir where host.frm was located and it worked. ive been trying to figure this out for 3 days. if i knew where you lived i would offer my girlfriend.

          -thanks B

            lol. i had a similiar experience trying to figure it out too the first time.

            for security at least chmod 755 the /var/lib/mysql directory & mysql.sock file. chmod 700 the directories with the databases & the log/error files. chown the /var/lib/mysql directory to whatever user mysql is running as.

              2 months later

              If I knew you were so generous, I would answer
              your questions earlier 🙂)

                5 months later

                I know this is an old one but I was able to fix this under Slackware by doing a chown -R mysql:mysql /var/lib/mysql

                Assuming you've got a mysql user of course.

                  Write a Reply...