Mysql Replication Problem , binlog files flooding my server

SYSTEM INFORMATION
OS type and version Ubuntu Linux 20.04.6
Webmin version 2.111
Virtualmin version 7.10.0
Webserver version Nginx
Related packages SUGGESTED

Hi Good day every one
I got a problem checking my server i found that my harddisk is almost full only 1gb remaining , after checking i found that what is taking almost 90% of my storage is Mysql binlog files and i found that there is replication happing phpmyadmin say’s so in the status page and i actually personally didn’t start any replication jobs and i don’t know which one of my wordpress websites that started such replication job , i added " server_id = 0 " to mysql conf file to stop any replication but the binlog part still flooding my server storage .
If any one can please give some advice
Thank you in advance

Data bases are my weakest point but searching shows this. Do you have any site with data worth stealing? Do you have users or is it just you? If you haven’t set up a database to sync then it is a user or worse? Or do the word press sites share data? Bottom line, 1 gig storage with multiple sites is far from optimal.

What is MySQL BinLog? : A Practical Guide to Usin.

  1. Replication
    MySQL BinLogs are essential for replication between multiple databases. By keeping track of changes made to one database, the other databases can be kept up to date with the most recent changes. This is an important tool for keeping data consistent across multiple databases.
1 Like

thank you for reply , my storage is not 1gb but 1gb is what is left binlog files eat up almost 200gb storage, i don’t know if its one of the websites i have or worse !

So you never turned on replication? Your using the standard Virtualmin install with mariadb?
Maybe they different logs.

I look at the MariaDB System Variables and found this. Whats yours.

1 Like

I Never turned the replication on , the variable " logn_bin " is on

You should be able to turn off, are you using mysqld or mariadb?
You did restart after the first change?

1 Like

mysqld , yes i can turn the binlog off but i still don’t know what turned the replcation on from the start !

The replication maybe a red herring

1 Like

Well thank you for trying to help i will check that link and keep searching

Binary Logging is turned on by default in MySQL 8.

You can either completely disable it (skip-log-bin) or set a default expiry time (binlog_expire_logs_seconds), as the default is to store the files is for 30 days.

1 Like

Is that also true for MariaDb (latest) if not then that is another reason to bin MySQL! (it should be optional - so if you require it then turn it on = I suspect most would leave it well alone!)

1 Like

It is not enabled by default in MariaDB 10.

3 Likes

Well thank you for the info i hope that is the main reason , i already turned the binlog off to stop the binlog flooding , i was worrying that there might be a backdoor in my server

Binary logging is there for a purpose (data replication and restoration), so it might be better to reduce the amount of data you are storing instead, if you have the storage capacity.

You can do that by adding binlog_expire_logs_seconds to your /etc/my.cnf.d/mysql-server.cnf file (this example is a production DB server running Rocky 9.4 which stores 3 days of binary logs).

Of course all of this is relative to how busy the database server is!

.....

innodb_dedicated_server=ON
skip-name-resolve=ON
binlog_cache_size=16M
binlog_expire_logs_seconds=259200
1 Like

That’s a bit unfair your opinions are your own and should not added to a forum, however with the software I run mysql which outstrips maria for perfomance but each to their own

so why has Virtuamin opted for for Mariadb? Is this real testing or just a opinion?

AWS seem to think Mariadb performers better.

1 Like

maybe - but also shared by others (which does make it relevant to an open discussion)

I accept there may be others of course. (including many die hards)

MySQL accepted still possibly outperforms MariaDB in the case of replication (though I have had trouble in finding any solid evidence)

and anyway I still believe this is niche to most users of Virtualmin (again I have no evidence of this) and that is no reflection on the OP question.

Again still believe it should be optional. If you have a great deal of unused space (again I suspect most of us do not) it will not be a problem.

I’d guess it’s because MariaDB is the default relational database server provided by RHEL.