Webinoly is just the perfect tool for NGINX experts. Give it a try!
0 votes
8.6k 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 Rookie

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.
Webinoly Support Paypal Donations

PayPal · GitHub Sponsors · Bitcoin

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

...