Home >Database >Mysql Tutorial >How to view mysql log files

How to view mysql log files

coldplay.xixi
coldplay.xixiOriginal
2020-10-09 14:26:408215browse

How to view the mysql log file: first open the mysql log and remove the comments in front of lines 68 and 69; then restart mysql [sudo service mysql restart]; finally monitor the mysql log.

How to view mysql log files

How to view the mysql log file:

Open the mysql log

/etc/mysql/mysql.conf.d/mysqld.cnf

sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf

Find the comments in front of lines 68 and 69 and remove them

How to view mysql log files

Then restart mysql

sudo service mysql restart

Listen to mysql log

sudo tail -f /var/log/mysql/mysql.log

How to view mysql log files

Related free learning recommendations: mysql number Database(Video)

The above is the detailed content of How to view mysql log files. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn