Page 1 of 1

Mysqld stopped with query

Posted: 2018/02/28 10:39:48
by midoo1992
Hello,
In my web application based on Centos 6.7, there are querys generated by clients that stopped service mysqld that's why a message is shown "Database is not connected".
Please, is there any solution to know which query stopp the service mysqld.

Re: Mysqld stopped with query

Posted: 2018/02/28 12:07:13
by TrevorH
You need to look at your logs and find out why it stops. It doesn't stop just because you run a query - it got an error of some kind or someone stopped it.

Re: Mysqld stopped with query

Posted: 2018/02/28 14:54:32
by midoo1992
Wich log you want to look
Where is located ?

Re: Mysqld stopped with query

Posted: 2018/02/28 15:54:21
by TrevorH
Start by reading /var/log/mysqld.log or /var/log/mariadb/mariadb.log, whichever version of "mysql" you are running. Also look in /var/log/messages for things like the linux Out Of Memory killer stepping in to save your whole system from dying.

Re: Mysqld stopped with query

Posted: 2018/03/01 10:14:52
by midoo1992
Thanks for your response,
I don't have any error related to the service mysqld.
The only error shown in the file /var/log/message is below when the mysqld stop:

Mar 1 04:24:14 ******* dbus: [system] Rejected send message, 1 matched rules; type="method_call", sender=":1.202" (uid=0 pid=599 comm="/opt/teamviewer/tv_bin/TeamViewer_Desktop) interface="org.freedesktop.DBus.Properties" member="Get" error name="(unset)" requested_reply=0 destination="org.gnome.DisplayManager" (uid=0 pid=4114 comm="/usr/sbin/gdm-binary))

It seems related to teamviewer !
Can teamviewer influence in the CPU's use so that mysqld stops ??

Re: Mysqld stopped with query

Posted: 2018/03/01 11:14:09
by TrevorH
That error is about a display problem, not anything to do with mysql at all. Look at your other log files too.

Re: Mysqld stopped with query

Posted: 2018/03/02 09:35:01
by pjsr2
I've seen this kind of termination of the database server when the limit for max_allowed_packet in the server settings is to small.
This happens when a query references large objects in the database.
Like TrevorH said: look for error messages in your database server log files /var/log/mysqld.log or /var/log/mariadb/mariadb.log.