Mysql stopped working

NDIS.NL

Verified User
Joined
Aug 29, 2010
Messages
8
Hello,

At once mysql stopped working.
i get this in 'System information'

Code:
directadmin MySQL 5.1.34 *** Stopped ***

And when i try to start mysql again i get this message:

Code:
An error has occurred

I dont know how this is posseble.
Directadmin is running on Debian 5 on a VPS.

Where do i need to look to find the problem. I can't find any log files or something. Maybe i looked in the wrong place?
i dit not find anything in /var/logs/

Thanks in advance
 
You should login at SSH and try starting MySQL from there.
Log file for MySQL can be found (for redhat, not sure if debian is the same) in /var/lib/mysql/
 
Mysql sais:
Code:
srv1:~# /etc/init.d/mysqld start
Starting mysqld:                [ OK ]

But it dit not start.

second:
the log file is not in /var/lib/mysql

Code:
srv1:~# cd /var/lib/mysql
-bash: cd: /var/lib/mysql: No such file or directory

This is in /var/lib

Code:
srv1:/var/lib# ls
apt       dovecot          libxml-sax-perl               quota         vim
aptitude  dpkg             linux-image-2.6.26-2-xen-686  sgml-base     x11
bind      initramfs-tools  logrotate                     spamassassin  xml-co
defoma    initscripts      misc                          ucf
dhcp3     libuuid          php5                          urandom

So, i'm stuck again.
 
Your log file is probably at /home/mysql - and then its called something like server.yourdomain.tld.err where server.yourdomain.tld is your server's hostname.
 
NDIS.NL. I'm running Debain 4, but I had the same problem that MySQL stopped working after an update. In the logfiles I saw that a file was not correct (errmsg.sys) and I had to copy it from:
/usr/local/mysql<version>/share/english/errmsg.sys to:
to
/usr/share/mysql/english/errmsg.sys

If you have the same problem, that might be the solution. :)

Your logfile is located in the mysqldata dir with the name of your server and ends with ".err" (at least on my debian it's that way). If you see something like this in the file: [ERROR] Error message file '/usr/share/mysql/english/errmsg.sys' had only 639 error messages,
but it should contain at least 641 error messages.

Then your problem is exactly the same as mine and you should perform a copy as mentioned above.

Regards,
Dreamline
 
Last edited:
I had to copy it from:
/usr/local/mysql<version>/share/english/errmsg.sys to:
to
/usr/share/mysql/english/errmsg.sys
You can better symlink the file instead of copy
ln -s /usr/local/mysql<version>/share/english/errmsg.sys /usr/share/mysql/english/errmsg.sys
Replace '<version>' by your version.
 
I found this in the log file of the server
Code:
100914 15:48:12  InnoDB: Starting shutdown...
100914 15:48:13  InnoDB: Shutdown completed; log sequence number 0 605318
100914 15:48:13 [Warning] Forcing shutdown of 1 plugins
100914 15:48:13 [Note]
100914 15:48:13 mysqld_safe mysqld from pid file /usr/local/mysql/data/srv1.pid ended
100914 15:49:02 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
100914 15:49:02 [ERROR] Can't find messagefile '/usr/share/mysql/english/errmsg.sys'
100914 15:49:02  InnoDB: Started; log sequence number 0 605318
100914 15:49:02 [ERROR] /usr/local/mysql/bin/mysqld: unknown option '--skip-bdb'
100914 15:49:02 [ERROR] Aborting

Then i created the symbolic link, and now it gives this error:

Code:
100914 15:54:12 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
100914 15:54:12  InnoDB: Started; log sequence number 0 605318
100914 15:54:12 [ERROR] /usr/local/mysql/bin/mysqld: unknown option '--skip-bdb'
100914 15:54:12 [ERROR] Aborting

100914 15:54:12  InnoDB: Starting shutdown...
100914 15:54:14  InnoDB: Shutdown completed; log sequence number 0 605318
100914 15:54:14 [Warning] Forcing shutdown of 1 plugins
100914 15:54:14 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

100914 15:54:14 mysqld_safe mysqld from pid file /usr/local/mysql/data/srv1.pid ended

The problem with the symbolic link is fixed. But now an other problem exists:

Code:
100914 15:54:12 [ERROR] /usr/local/mysql/bin/mysqld: unknown option '--skip-bdb'
100914 15:54:12 [ERROR] Aborting
 
That --skip-bdb to do with The BDB (BerkeleyDB) Storage Engine, see this

Ok, i did this.

Code:
100914 18:54:11 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
100914 18:54:12  InnoDB: Started; log sequence number 0 605318
100914 18:54:12 [Note] Event Scheduler: Loaded 0 events
100914 18:54:12 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.1.34'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
100914 18:54:50 mysqld_safe Number of processes running now: 0

Now everything looks fine in the log. But mysql still is not running.
http://www.ndis.nl/webmail
It still has no database connection
also http://forum.ndis.nl

There shut be another problem... This is realy strange
 
It says in your log it created a socket in /var/run/mysqld/mysqld.sock, and your error on websites say /tmp/mysql.sock. Maybe edit the config so it creates a socket in /tmp/ or create a symlink.

edit: not sure actually cause theres a mysqld.sock and mysql.sock. But check your my.cnf.
 
Yes, that did it :d
MYSQL works again.

Everybody thanks for your help!

This was my final solution
Code:
srv1:~# /etc/init.d/mysqld stop
Stopping mysqld:                [ OK ]
srv1:~# ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock
srv1:~# /etc/init.d/mysqld start
 
Back
Top