469,299 Members | 2,035 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,299 developers. It's quick & easy.

mysql.sock question

This is a mysql/php question (but a little more on the mysql side.)
The two are so closely related these days, I thought it would be ok to
ask here.

I installed on my Suse Linux system mysql 4.0 using an rpm. I also
installed all of the appropriate PHP 4.3 and Apache 2.0 rpms.

I set my socket path in my.cnf to /tmp/mysql.sock.
I then, just to be safe and thorough, copied this my.cnf to ~/.my.cnf
and to the /var/lib/mysql directory with my databases (basically
everywhere it might be looked for).

If I sign into mysql under my root account, I get in fine.
If I sign in under any other account, it gives me the error that it
cannot open /var/lib/mysql/mysql.sock. I don't know why it would
think to use this path since I have changed reference to it in my.cnf
and placed my.cnf everywhere.

I grepped through my entire system for any other mention of this path
since I had already fixed my.cnf which should have been enough. I
found reference to it in /init.d/mysql and rc.d/mysql. I don't know
why these files exist, but I fixed to /tmp/mysql.sock here too.

Also references where found within the rpm binaries I installed from.

My question: Is it possible that the MySQL binary I installed via rpm
is tainted in such a way that it tries to create
/var/lib/mysql/mysql.sock, even overriding the direction I gave in
my.cnf? Could it be hardwired into the executable mysql binary? Not
only did I fix my.cnf, but I fixed all references to
/var/lib/mysql/mysql.sock to /tmp/mysql.sock in every text file in the
system and rebooted and still had the same problem!

It is frustrating, but PHP gives me a work-around to make it possible
for me to still write php-mysql code. I do
which works and apparently was added to PHP somewhere in version 3. (I
mean support for specifying the socket path).

2nd Question: Is there any solution other than removing mysql as
installed by rpm and re-installing actual mysql binary from mysql.com?

It's so frustrating when the program promises to look in my.cnf and
ignores what I have put in there (unless I am root).

Thanks for any advice!

Jul 17 '05 #1
0 2149

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Oliver Etzel - GoodnGo.COM | last post: by
reply views Thread by Oliver Etzel - GoodnGo.COM | last post: by
reply views Thread by Oliver Etzel - GoodnGo.COM | last post: by
2 posts views Thread by Ben | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.