472,353 Members | 1,897 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

mysql.sock question

MJL
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
mysql_connect("127.0.0.1:/tmp/mysql","user","password");
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!

mjl
Jul 17 '05 #1
0 2234

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Oliver Etzel - GoodnGo.COM | last post by:
Hello all, after Installing mysql I started the mysql daemon.. The I tried to log in to my mysql database and got the message could not find...
0
by: Oliver Etzel - GoodnGo.COM | last post by:
Hello all, after Installing mysql I started the mysql daemon.. The I tried to log in to my mysql database and got the message could not find...
0
by: Oliver Etzel - GoodnGo.COM | last post by:
Hello all, after Installing mysql I started the mysql daemon.. Then I tried to log in to my mysql database and got the message could not find...
0
by: JW | last post by:
Hi all, I was fine running mysql, and for some reason, after the most recent reboot of my machine, I get the following error and I try the...
1
by: JW | last post by:
Hi all, I was fine running mysql, and for some reason, after the most recent reboot of my machine, I get the following error and I try the...
1
by: jiing | last post by:
Now let me describe what I have done and my purpose: Originally, I want to user ports to install phpBB But I found that phpBB doesn't support...
2
by: Ben | last post by:
Hi, I installed mysql 5.0 on redhat 9.0 from source (tar). The whole procedure occured properly, i could do ./mysqld_safe. But when i want to...
1
by: linux | last post by:
Sorry if this is a really dumb question. I am trying to connect to our remote MySQL server (which is running just fine). I have a perl script...
2
by: Michal Stankoviansky | last post by:
Hi Environment: some version of Slackware, Apache 2.2.x, PHP 5.1.5, MySQL 5.0.24. The issue: I'm using Zend Framework Zend_Db component (which...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.