473,395 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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 2291

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 mysql.sock in /tmp. In the mysql-configuration...
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 mysql.sock in /tmp. In the mysql-configuration...
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 mysql.sock in /tmp. In the mysql-configuration...
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 following subsequent commands to try to figure things...
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 following subsequent commands to try to figure things...
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 mysql 5.x (but the ports installed mySQL 5.0.0...
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 start the client: mysql, i get :error 2002: cannot...
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 which worked just fine on my other Fedora 4 box (all...
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 uses PDO). We have 2 mysql socket related...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.