I'd like to thank the other posters here at PHP Builder. It was with your help that I fixed this problem I was having with MySQL. I just wanted to post a fix here, because I haven't found one elsewhere on the net.
Setup: Red Hat 7, NuSphere MySQL 1.13.2 (a distribution of Apache 1.13.14, MySQL 3.23.27, PHP 4.0.3pl1, Perl 5.6.0, Webmin, and phpMyAdmin).
Problem: At first things were fine, but at some point I was no longer able to start mysql from the command line. I'd keep getting "Can't connet to mysql through socket mysql.sock." (That's not an exact quote).
I found out that restarting the mysqld takes care of rewriting the socket file (/tmp/mysql.sock) but it didn't seem to be working. But there was a "mysql-root.sock" file there. I dug the config script (my.cnf) and found two lines mentioning the socket file and both of them were set to write to mysql-root.sock and not mysql.sock: "socket = /tmp/mysql-root.sock" I had notice this before, I think, but hadn't bothered it for fear that there were two socket files needed. Evidently, that's not the case.
So I commented out the bad one, wrote a new one specifying /tmp/mysql.sock, and restarted mysqld. That fixed it. Now I can connect from the command line as well as from phpMyAdmin (which worked throughout since it was connecting via TCP/IP and not the socket file).
Hope this helps others & thanks for this forum,
James
<!-- m --><a class="postlink" href="http://ubets.uark.edu/~jemartin/home">http://ubets.uark.edu/~jemartin/home</a><!-- m -->
Setup: Red Hat 7, NuSphere MySQL 1.13.2 (a distribution of Apache 1.13.14, MySQL 3.23.27, PHP 4.0.3pl1, Perl 5.6.0, Webmin, and phpMyAdmin).
Problem: At first things were fine, but at some point I was no longer able to start mysql from the command line. I'd keep getting "Can't connet to mysql through socket mysql.sock." (That's not an exact quote).
I found out that restarting the mysqld takes care of rewriting the socket file (/tmp/mysql.sock) but it didn't seem to be working. But there was a "mysql-root.sock" file there. I dug the config script (my.cnf) and found two lines mentioning the socket file and both of them were set to write to mysql-root.sock and not mysql.sock: "socket = /tmp/mysql-root.sock" I had notice this before, I think, but hadn't bothered it for fear that there were two socket files needed. Evidently, that's not the case.
So I commented out the bad one, wrote a new one specifying /tmp/mysql.sock, and restarted mysqld. That fixed it. Now I can connect from the command line as well as from phpMyAdmin (which worked throughout since it was connecting via TCP/IP and not the socket file).
Hope this helps others & thanks for this forum,
James
<!-- m --><a class="postlink" href="http://ubets.uark.edu/~jemartin/home">http://ubets.uark.edu/~jemartin/home</a><!-- m -->