Turn on MySQL slow query, restart prompt starting mysql.the server quit without updating PID file

Source: Internet
Author: User

In the My.cnf file, add:

DataDir =/usr/local/mysql/datalong_query_time = # record the query time checked for 1 seconds. log-slow-queries =/usr/local/mysql/log/db-test2-slow.log# Log directory. #log-queries-not-using-indexes# represents a query that does not use an index in the record.

After that, restart MySQL, prompting:

[[Email protected] subsys]# service MySQL Statusmysql is not running [failed][[email Protected] subsys]# service MySQL startstarting mysql.the server quit without updating PID file (/[failed]l/mysql/data/lo CALHOST.LOCALDOMAIN.PID).

Steps to resolve:

1, the above a few lines of new added all the comments out,

2. Delete the/var/lock/subsys/mysql

3. Change the utf-8 inside the config file to UTF8


Problem solved. However, if you join the slow query at the beginning of this article, you still cannot. To the online check, the original version after 5.6, the way to open the slow query changed.


The open statement should be written like this (modify MY.CNF):

Slow-query-log=1slow-query-log-file=/usr/local/mysql/data/slow.log

Save, restart, problem solved.


Reference information is: http://www.2cto.com/database/201304/203100.html

This article is from the "Linux geek" blog, so be sure to keep this source http://linux200801.blog.51cto.com/10462766/1672062

Turn on MySQL slow query, restart prompt starting mysql.the server quit without updating PID file

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.