473,543 Members | 2,455 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2296

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

Similar topics

0
1835
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 file /etc/my.cnf (in my redhat system 8.0) I changed the place for the socket file from "socket=/var/lib/mysql/mysql.sock" to...
0
1443
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 file /etc/my.cnf (in my redhat system 8.0) I changed the place for the socket file from "socket=/var/lib/mysql/mysql.sock" to...
0
1434
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 file /etc/my.cnf (in my redhat system 8.0) I changed the place for the socket file from "socket=/var/lib/mysql/mysql.sock" to...
0
1275
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 out: # mysql ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) # mysqld_safe
1
3868
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 out: # mysql ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) # mysqld_safe
1
121512
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 alpha) so I deinstall mysql5-server and mysql5-client And then I install mysql41-server and mysql41-client on FreeBSD 5.3 by ports but now , mysql is...
2
3031
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 connect to mysql server through 'tmp/mysql.sock'. I set /tmp with the sticky bit, because otherwise file 'mysql.sock' woukd be deleted !?. I also...
1
4490
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 servers are Fedora 4 with latests updates). The one that worked fine it down and I cannot compare anything against it (it was a client also). ...
2
18750
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 settings in php.ini: mysql.default_socket = /var/run/mysql/mysql.sock mysqli.default_socket = /var/run/mysql/mysql.sock
0
7341
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7584
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7729
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7332
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7677
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5258
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3385
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3386
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
626
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.