Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 35.1Mb
PDF (A4) - 35.2Mb
Man Pages (TGZ) - 256.4Kb
Man Pages (Zip) - 361.2Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
Excerpts from this Manual

MySQL 5.7 Reference Manual  / ...  / MySQL Server Administration  / Debugging MySQL  /  Debugging a MySQL Server

5.8.1 Debugging a MySQL Server

If you are using some functionality that is very new in MySQL, you can try to runmysqld with the--skip-new option (which disables all new, potentially unsafe functionality). SeeSection B.3.3.3, “What to Do If MySQL Keeps Crashing”.

Ifmysqld does not want to start, verify that you have nomy.cnf files that interfere with your setup! You can check yourmy.cnf arguments withmysqld --print-defaults and avoid using them by starting withmysqld --no-defaults ....

Ifmysqld starts to eat up CPU or memory or if ithangs, you can usemysqladmin processlist status to find out if someone is executing a query that takes a long time. It may be a good idea to runmysqladmin -i10 processlist status in some window if you are experiencing performance problems or problems when new clients cannot connect.

The commandmysqladmin debug dumps some information about locks in use, used memory and query usage to the MySQL log file. This may help solve some problems. This command also provides some useful information even if you have not compiled MySQL for debugging!

If the problem is that some tables are getting slower and slower you should try to optimize the table withOPTIMIZE TABLE ormyisamchk. SeeChapter 5,MySQL Server Administration. You should also check the slow queries withEXPLAIN.

You should also read the OS-specific section in this manual for problems that may be unique to your environment. SeeSection 2.1, “General Installation Guidance”.