mysql wont start in DA

Jordi

Verified User
Joined
Jan 14, 2006
Messages
15
Hi,

I'm running:
Apache 1.3.34
DirectAdmin 1.26.1
Exim 4.50
MySQL 4.1.11
Named 9.2.4
ProFTPd 1.2.10
sshd
vm-Pop3d
On debian (all fresh install)

I want to create a mysql database and got this error:
Error connecting to MySQL: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

I search this forum about it, nothing helpt me with my problem...

mysql is running:

[root@alsjeblief]# ps -e | grep mysqld
13427 pts/1 00:00:00 mysqld_safe
13528 pts/1 00:00:00 mysqld
13529 pts/1 00:00:00 mysqld
13530 pts/1 00:00:00 mysqld
13531 pts/1 00:00:00 mysqld
13532 pts/1 00:00:00 mysqld
13533 pts/1 00:00:00 mysqld
13535 pts/1 00:00:00 mysqld
13536 pts/1 00:00:00 mysqld
13537 pts/1 00:00:00 mysqld
13543 pts/1 00:00:00 mysqld

I cant stop - restart - start mysql trough DA
I did a killall mysql
Try to start it trough DA, diddn't work, it just say 'error'

I can start it in shh:
service mysql start
(note, in the other topics i saw "service mysqld start" if i do that it says mysqld: unrecognized service)

try to create database,.. error... so i start mysql true ssh like:
/etc/rc.d/init.d/mysql start but same problem.

Did updatedb and locate mysql.sock this is located in:
/var/lib/mysql/mysql.sock (error above says cant find /tmp/mysql.sock, maybe thats something?)

There are no mysql errors in /var/log/messages

I also saw in other topics people talk about my.cnf with similar problems, so i did:
[root@alsjeblief /]# updatedb
[root@alsjeblief /]# locate my.cnf
[root@alsjeblief /]#

Nothing there...

So, i can not create database in DA, cant start or stop mysql in DA

Can anyone please help me
 
Last edited:
Problem solved bij directadmin support :-)

Maybe useful for other people:

I added:

socket=/var/lib/mysql/mysql.sock

to the /usr/local/directadmin/conf/mysql.conf file. Seems to work now.

I checked the cause of this problem.

You are running ES4.2 but are using the debian binaries.

If you encounter any issues as a result of this, you'll probably want to get the correct binaries for your OS.
I've already updated your license to the correct OS on our end. If you do hit any issues, then run this:
http://help.directadmin.com/item.php?id=29


everything works fine now
 
Jordi - I'm having this exact problem - overlooked your post before I made a new one.

I don't fully understand what you did to fix it, can you elaborate please?

Thanks
 
I ran:

[root@alsjeblief customapache]# rpm -qa |grep SQL
MySQL-client-4.1.11-0
MySQL-server-4.1.11-0
[root@alsjeblief customapache]#

which shows that MySQL-devel is not installed, hence there are no mysql headers for php to use, so it's defaulting to the old client api version.

I installed MySQL-devel and recompiled php

As for why it wasn't installed in the first place, I can't say.
The mysql.sh does install MySQL-devel, and the file was there, and intact, so I'm not sure why it did not get installed.
 
Where do I run this at? What exactly to I run? I'm totally new to this. Is there some step by step that tells me exactly what to 'run' and where? I don't know how to recompile anything, lol - it is all greek to me. Thanks.
 
Wel, so am i...

What i posted comes from the DA Help, they did that and mailed me what they did...

The last post i did you have to go in /usr/local/directadmin/customapache/

Do: updatedb

then: cd /usr/local/directadmin/customapache/
then: rpm -qa |grep SQL

If you have the devel than you have an other problem...

if you dont try to run the mysql.sh again and see if it install MySQL-devel

If it dont i think you better mail to DA with your UID and LID, root login and passwd and the problem ofcourse...
 
tsunami# pwd
/usr/local/directadmin/customapache
tsunami# updatedb
updatedb: Command not found.
tsunami#


That is the message I get when trying to updatedb
 
Wow I just had a scare with the same issue on a production box.

I was working with a system wide backup and in the System Message Ticket area I got a message saying that the backup was done. At the bottom of the message it said that it had dumped all the databases. Now that I go back I guess 'dumped' doesn't mean that that they were dropped.

Once it was finished I couldn't get back into phpmyadmin using any login/password, not even the da_admin one and none of the sites worked that were making MySQL calls.

Ran across this post and a few others in the forums the RH commands weren't working; I use Debian. From what I could see MySQL was running but I couldn't restart it via DA nor with:

Code:
/etc/init.d/mysql stop|restart

For my fix I killed all:

Code:
killall mysql

And then restarted MySQL via DA, DA gave me an error at first then I refreshed and the pids were showing up and I was able to use phpmyadmin using the da_admin login/password and all is good.

I'm using 1.25.2; maybe an update'll clear up the issue.

I hope that'll help the next person that has this kind of issue.
 
killall may be safe, but you should check with the publishers of MySQL to be certain. killall -9 is definitely not safe; it will close all mysql processes with saving everything first.

Jeff
 
Hi
This is not a good day for me,I had problem for webmail and squirrelmail and by edit php.ini (safemod=off)and changing permissions it solved but now mysql not work and I dont know for waht?maybe i changed some permission and can't remember or maybe i rau ./update on scripts.

[root@hostname /]# ps -e | grep mysqld
22583 ? 00:00:00 mysqld
22597 ? 00:00:00 mysqld

[root@hostname /]# service mysqld restart
MySQL PID file could not be found! [FAILED]
Starting MySQL................................... [FAILED]

and this is error of users on DA:
Error connecting to MySQL: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

And the mysql.sock is in (var/lib/mysql/)
by this permission: srwxrwxrwx 1 mysql mysql 0 Sep 12 1:04 mysql.sock

And i cant open mysql.sock by vi for permission problem,please help:confused:
 
Hi guys
I havo no more time and its urgent to fix this problem,If there is no way,Please guide me how to install a fresh copy of mysql4 and save users db .
Thanks
 
Back
Top