Strange mysql.sock error / Fixed but Still

Manie

Verified User
Joined
Jul 18, 2006
Messages
124
Location
Utrecht / Netherlands
Hi All,

Since 2 months I have an external server @ a dedi-farm.
They installed Debian 5.0 and I installed DA on it.

So far so good, however after some issues with applications
not being able to connect to the socket (offcourse during my holliday) I tried to quick-fix it.

Now I am very curious why my clean-fix was not working.
( With clean I mean: no symbolic links required. )

My solution FOR NOW:
I located my mysql.sock in /tmp
And I created a symbolic link to that: /var/run/mysqld/mysqld.sock
Now all my troubles went away! Hurray!
( I cleared out the mysql sock in php.ini, seems /tmp is default! And I added the path in my.cnf)
The symlink was required; why? Dont know! Restarted both apache and mysql, but now my webrequests still try to connect to /var/run/mysqld/mysqld.sock and return an error. (Just created the symlink.)

But I first wanted to clean the mess in a non-sym-link way.
( Call me a need-freak if you like. )

My initial try was to just configure the applications to use: /var/run/mysqld/mysqld.sock

I made the changes in /etc/my.cnf
(only .cnf there, no /etc/mysql/my.cnf or whatsoever)
And I forced the socket in the php.ini for mysql to use:

/var/run/mysqld/mysqld.sock.

However: this gives a clean enviroment for phpmyadmin and apache php requests, I get the can not connect errors for DA backups.
So where is DA getting their sock-path from?

Very curious where paths are need to be set beside of php.ini and my.cnf.

Regards,
Armand
 
Take a look in /usr/local/directadmin/conf/mysql.conf, but my systems never use a specific MySQL socket instance, just something like this:

/etc/my.cnf
Code:
[mysqld]
local-infile=0

So, why don't you try using this as my.cnf and restarting MySQLd.
 
This is the only thing in /usr/local/directadmin/conf/mysql.conf:
user=da_admin
passwd=***

And I have seen the default infile my.cnf, but I do want to optimize mysql in a matter of timeouts and memory.
 
Back
Top