Kategoriearchive: mysql


handle xt_recent from syslog-ng 2

The solution from Block outdated clients won´t work with syslog-ng 3.4.2, because syslog-ng syslog-ng uses “lseek()” to get the end of /proc/net/xt_recent/something while the program() destination just starts the program. Withe the destination file you get log-entries like: Aug 29 00:00:44 mx03.schaal-24.de syslog-ng[20351]: Error suspend timeout has elapsed, attempting to […]


ISPConfig Cluster-Setup could crash the MySQL-replication 1

First note: what I describe here is not an Bug in ISPConfig, but rather a concatenation of unfortunate circumstances. If you have two ore more database-servers in ISPConfig and they are also running in a mysql-replication (what is conventional), in certain circumstances the mysql-replication could crash with an error 1007 […]


secure MySQL-replication with stunnel 2

I use stunnel to secure my MySQL-replication. MySQL itself offers SSH, but it´s not so simple to install. If stunnel works on your sytsme, you can use it for much more daemons/ports (secure imap, pop3, http). With stunnel only the remote connects to the master server use the tunnel. Local […]


Use nagios to monitor a mysql-replication 2

I´ve already pointed out here, that you can easily restart a replication. But you have to know that the replication isn´t working. Instead of continuously typing “CHECK SLAVE STATUS\G” in mysql i´ve decided to use nagios for that. If something is wrong, i get a mail and a notification in […]


restart mysql master-master replication 6

If the mysql-replication is broken, there are two ways to fix the problem: skip the error rebuild the replication In some cases you could easily skip error. If you for example execute the same INSERT on both server. Skip the error Login into mysql as root: STOP SLAVE; SET GLOBAL […]


mysql master-master-replication 1

In contrast to a master-slave replication in a master-master replication changes made on one server are immediately available on both. The setup of a master-master-replication is similar to a master-slave-replication. I show here only the differences (for the basics see mysql master-slave-replication). In the following to old master remains as […]


mysql master-slave-replication 1

In a master-slave replication on the slave are the databases of the master 1:1 available. Changes performerd on the master are immediately available on the slave (as long as you don´t user master_delay). Thus, it is not a true backup solution. Master setup: Change the section [mysqld] in /etc/my.cnf. Make […]


fail2ban with xt_recent reloaded 1

Here is the addition to fail2ban mit xt_recent. Fail2ban can ban ip only until the server restarts. I therefore add the bans not only in the firewall, but store them also into a mysql database. Basics I´ve created the database systemlog which containing two tables – one for the configs […]