Tag Archives: mysql

Relay log read failure: Could not parse relay log event entry

It happened today… why? Well, I was testing parallel replication (slave_parallel_threads) and after setting the number of threads to zero and when started the slave I got this wonderful error message: MariaDB [(none)]> show slave status\G *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: master.example.com Master_User: user Master_Port: 3306 Connect_Retry: 60 … Continue reading Relay log read failure: Could not parse relay log event entry

mysql: preload InnoDB buffer pool

Why?! To avoid a lengthy warmup period after restarting the server, particularly for instances with large InnoDB buffer pools. Things to be added to /etc/mysq/my.cnf: # Shortened warm-up times with a preloaded InnoDB buffer pool innodb_buffer_pool_dump_at_shutdown=ON innodb_buffer_pool_load_at_startup=ON Basically when MySQL receives the TERM signal will dump the InnoDB buffer pool /data/db/mysql/ib_buffer_pool and it will load it … Continue reading mysql: preload InnoDB buffer pool

How to install a OpenVPN System Based On User/Password Authentication with mysql & Day Control (libpam-mysql)

This document describes how to install a OpenVPN server with User/Password authentication with mysql and day control using libpam-mysql. This will be a brief, but a very practical document. Install mysql server [codesyntax lang=”bash”] apt-get install mysql-server [/codesyntax] Create a mysql user and a database to be used later [codesyntax lang=”bash”] mysql -u root -p … Continue reading How to install a OpenVPN System Based On User/Password Authentication with mysql & Day Control (libpam-mysql)

How to find top10 largest mysql tables

[codesyntax lang=”sql”] SELECT CONCAT(table_schema, ‘.’, table_name), CONCAT(ROUND(table_rows / 1000000, 2), ‘M’) rows, CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), ‘G’) DATA, CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), ‘G’) idx, CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), ‘G’) total_size, ROUND(index_length / data_length, … Continue reading How to find top10 largest mysql tables