Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Where is the mysql log file in linux?

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Where is the mysql log file in linux? I believe that there are many people do not understand, today, in order to let you know more about the mysql log files in linux, so give you a summary of the following, let's look down together.

Where is the MySQL log in Linux

The MySQL log in Linux is generally saved in the / var/log/ directory, but you need to see the specific configuration file to determine it. The specific methods are as follows:

1. Log in to mysql:

> mysql-u root-p

2. Then check to see if logging is enabled

Mysql > show variables like 'log_%'

3. View the current log

Mysql > show master status

4. The log types of mysql that you need to know:

Error log:-log-err

Query log:-log

Slow log:-log-slow-queries

Update log:-log-update

Binary log:-log-bin

5. Modify the configuration / etc/my.cnf (the following is the location where the log files are saved)

[mysqld] log=/var/log/mysqld_common.loglog-error=/var/log/mysqld_err.loglog-bin=/var/log/mysqld_bin.bin

Guess you still want to see:

1. The method of dynamically viewing mysql log files in Linux terminals.

2. How to enable mysql log by centos7

These are the details of where the mysql log files are in linux, and do you have anything to gain after reading them? If you want to know more about it, welcome to the industry information!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report