Protected: MariaDB: replication, recovering and switching for Master-Slave mode.

This content is password protected. To view it please enter your password below:

MariaDB: репликации баз данных

Репликация Master-Slave используется для обеспечения отказоустойчивости доступа к базам. Также позволяет распределить нагрузку на базы данных между несколькими серверами.

Сама по себе репликация выгляди как подход к масштабированию баз. Данные с одного сервера базы данных постоянно копируются (зеркалируются) на другие подобные серверы. Для прикладных программ это дает возможность использовать не один сервер для обработки всех запросов, даже без балансировщкиа. Таким образом появляется возможность распределения нагрузки.

“MariaDB: репликации баз данных”Continue reading

Conversion table types in MySQL #2

Sometimes it is necessary to convert a MySQL table in an existing database. For example, I ran into this with the need to create relationships between tables through the foreign key. As it turned out, the default MySQL MyISAM engine does not support this. To create a link table must be of type InnoDB. But this is not a big problem, because you can convert the table. To convert a single table SQL query is enough (which can be done, for example, through phpmyadmin):

“Conversion table types in MySQL #2”Continue reading

Convert MyISAM in InnoDB for WordPress

Recently I migrated all MyISAM tables to InnoDB for some WP sites of clients.

I saw some improvement in mysql performance, specially when editing posts. I think earlier parallel write on


table were getting blocked because MyISAM do not support row-level locking.

“Convert MyISAM in InnoDB for WordPress”Continue reading

Optimal size of innodb_log_file_size

As you know, during commit InnoDB writes the data at once into data files and records changes in the first innodb_log_file. The fact that write data directly to the table – a much more expensive operation than to record changes in the binary log.
Keeping innodb_log_file allows optimization of I/O: write data to successive large pieces, and more quickly serve customers (customer commits quickly made, and the data in the table space are recorded in the background). Therefore, the larger the file, the more opportunities to optimize InnoDB I/O. Currently, the total size of innodb_log_file limited to 4 GB, which is more than enough for most cases.

“Optimal size of innodb_log_file_size”Continue reading

Scroll to top