Warning

 

Close

Confirm Action

Are you sure you wish to do this?

Confirm Cancel
BCM
User Panel

Posted: 3/1/2006 8:52:22 AM EDT
Just trying to get a connection to setup poll surveys, message boards, etc.

I've tried several versions and methods and I still get...


Connection error:

Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)


I've got a green connection light on mysql admin software and everything is connected but still
not working with any software.

I know this is real general information but was wondering if anyone could help with a mysql noob, keeping it as simple as possible. All the websites I've found so far seem to be for advanced users.

Thanks!
Link Posted: 3/1/2006 8:53:33 AM EDT
[#1]
Check to see that the file /tmp/mysql.sock exists and that you have permissions to read and write to it.
Link Posted: 3/1/2006 8:56:46 AM EDT
[#2]
find / -name mysql.sock -exec ln -s '{}' /tmp/mysql.sock \;

h.gif
Link Posted: 3/1/2006 8:57:25 AM EDT
[#3]
Look in /etc/mysql/my.cnf or /etc/my.cnf to see where it should be.  It will look like:

[client]
...
socket          = /var/run/mysqld/mysqld.sock


[mysqld_safe]
...
socket          = /var/run/mysqld/mysqld.sock


[mysqld]
...
socket          = /var/run/mysqld/mysqld.sock


Make sure that all three point to the same file.  Your settings could point to /tmp/mysql.sock instead.


The permissions on your /tmp directory should look like:

drwxrwxrwt  9 root root 192512 Mar  1 12:56 /tmp


To change them do:

chmod 777 /tmp
chmod +t /tmp


z

Link Posted: 3/1/2006 9:03:12 AM EDT
[#4]
Link Posted: 3/1/2006 9:28:47 AM EDT
[#5]
ok, i've made so many changes, i've uninstalled and removed any registry info on mysql and gonna start fresh.

First of all, is mysql-4.0.26 the only software I need?  It's not the latest, but the forum software I have recommended 4.x.

Thanks
Link Posted: 3/1/2006 9:57:49 AM EDT
[#6]
I'm certainly no MySQL expert, but I feel your pain.
I could not justify the administrative overhead as my
needs were simple. I switched to SQLite, YMMV.
SQLite can replace MySQL for most purposes, but not all.
Link Posted: 3/2/2006 12:39:19 AM EDT
[#7]
Link Posted: 3/2/2006 12:40:14 AM EDT
[#8]
Close Join Our Mail List to Stay Up To Date! Win a FREE Membership!

Sign up for the ARFCOM weekly newsletter and be entered to win a free ARFCOM membership. One new winner* is announced every week!

You will receive an email every Friday morning featuring the latest chatter from the hottest topics, breaking news surrounding legislation, as well as exclusive deals only available to ARFCOM email subscribers.


By signing up you agree to our User Agreement. *Must have a registered ARFCOM account to win.
Top Top