This article mainly introduces the summary of MySQL log maintenance policies. if you need a friend, you can refer to the mysql server that will be tossed over the next few days. so I collected some maintenance policies on the Internet and then
Lnmp how to disable mysql log Protection hard disk space LNMP
BitsCN.com
Today, we found that the VPS hard disk is almost full. The first reaction is: it must have been caused by a log file of something, because it had similar experience in
These days to toss MySQL server, so on the internet to collect some maintenance strategies, and then summarize their own experiments, the following is my experience and some of the suggestions of others.
Log type:
MySQL has several different log
MySQL when the MySQL server is started, it checks its command line action to see if it should perform a login and open the appropriate log file (if it should). You can have the server generate two main types of log files:
Regular log files. It
Let's share the following, the way to close the MySQL log
LNMP a key package installed MySQL default open MySQL log, if the site on the database read and write more frequently may generate a large number of logs, and occupy disk space, but also may
In general, the log first reflects the application of the current problem, in the mass log found in our abnormal records, and then recorded, and according to the situation alarm, we can monitor the system log, Nginx, Apache, business log. Here I
Today, I saw a VPS installed LNMP environment under a Web site can not open, but also the problem of the database could not be linked, through the df-l to see the hard disk occupy 100%, it appears to be due to disk occupancy. There is no special
I in an article on the famous LNMP host one-click Installation Tool, compared to the military elder brother Lnmp and AMH host difference, because AMH has user background interface, easy to novice operation, it is recommended.However, last weekend my
First we can use the following command to clean up the MySQL log:
Rm-f/usr/local/mysql/var/mysql-bin.*
Then restart your own VPS, if it is LNMP use:
/ROOT/LNMP restart
This allows us to remove unwanted junk log files, and then if we need to
MySQL has several log files, can help you find, what activity was taking place.
Log type
Information write to log file
Error log
Problems encoutered starting, running or stopping mysqld
General
Morning Encounter Server data exception, find log not found. Current data in DB, no solution. Fortunately, MySQL has a record, not more than 1 days.Operation Steps:MySQL--help |grep mysql.cnfShown below/ETC/MY.CNF/VAR/LIB/MYSQL/MY.CNF
Database is a very important part of information system, it is very important to manage it reasonably and efficiently. Typically, the total administrator creates different administrative accounts, and then assigns different operational permissions
MySQL Log management error logConfiguration method:vim/etc/my.cnf[mysqld]log-error=/tmp/mysql.logTo see how to configure:' %log%error% ';Role:Log the general status of MySQL database and error information, is our database of regular error processing
One, log-related server variablesMysql>show Global variables like '%log% '+-----------------------------+----------------------------------------+| variable_name | Value |+-----------------------------+----------------------------------------+| Back_
MySQL log features detailed query, slow queryMySQL log: A large number of IO operations are not recommended to write to a fileMysql> show global variables like ' innodb% ';mysql> show global variables like '%log% '; General_log | OFF Log |
This article mainly introduces Mysql log files and log types. This article describes the log file types, error logs, General query logs, slow query logs, binary logs, and so on, for more information, see
Log file type
MySQL has several different
This article mainly introduces the log Operation Commands of MySQL, which focuses on the log deletion methods of MySQL. For more information, see
1. first confirm whether your log is enabled
MySQL>show variables like 'log_bin';
If ON is enabled,
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.