If you know about NGINX and servers, Webinoly is for you!
0 votes
1.2k views
by Rookie

Hi,

I am facing a serious issue. The mysql logs are generated too frequently and too big files. I only run a small site on the server and the logs consume 38GB space in only a few hours(maybe even minutes). Due to this mysql stops working and site crashes. I have attached logs generated within a few minutes. These are logs just for a few minutes. Please have a look and thanks for the help.

by Rookie
I have the same issue on my website on digitalocean.  how did you resolve this issue?

I just delete the log files, but I cannot resolve this issue completely.
by Rookie

Here's how to fix it.

Edit the file /etc/mysql/my.cnf

Find a line that reads "log_bin" and remove or comment it as follows:

#log_bin = /var/log/mysql/mysql-bin.log

You also need to remove or comment following lines:

#expire_logs_days = 10

#max_binlog_size = 100M

Close and save the file. Finally, restart mysql server:

# service mysql restart

2 Answers

0 votes
by Talented

how many sites you have?

VPS with just one:

by Rookie

Here's how to fix it.

Edit the file /etc/mysql/my.cnf

Find a line that reads "log_bin" and remove or comment it as follows:

#log_bin = /var/log/mysql/mysql-bin.log

You also need to remove or comment following lines:

#expire_logs_days = 10

#max_binlog_size = 100M

Close and save the file. Finally, restart mysql server:

# service mysql restart

0 votes
by Expert
Did you made some changes to MariaDB (MySQL) configuration?

Did you read the logs to see what is causing so many records?
by Rookie

No I did not make any changes.
Here's how to fix it.

Edit the file /etc/mysql/my.cnf

Find a line that reads "log_bin" and remove or comment it as follows:

#log_bin = /var/log/mysql/mysql-bin.log

You also need to remove or comment following lines:

#expire_logs_days = 10

#max_binlog_size = 100M

Close and save the file. Finally, restart mysql server:

# service mysql restart

Welcome to the Community site for Webinoly.

Our Optimized LEMP Web Server is a powerful set of commands for doing just about anything you could wish.

With Webinoly you can set up your NGINX web server in just one step.

* * * * * * *

To report a bug, please create a new issue on GitHub or ask a question here with the bug tag.

Donations

Webinoly Support Paypal Donations Webinoly Support Bitcoin Donations GitHub Sponsors

Your regular donations is what keep this project moving forward. If you like Webinoly, buy me a coffee or a beer to show support.

Affiliate Links

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.

...