Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master’s binary log is corrupted

To Resolve such kind of issue, check the master relay log as follow; mysql> slave stop; Query OK, 0 rows affected (0.00 sec) mysql> change master to master_log_file=’mysql-bin.000001′,master_log_pos=207078754; Query OK, 0 rows affected (0.04 sec) mysql> start slave; Query OK, 0 rows affected (0.00 sec) Now you can check , Slave should start working.

MySQL Replication Slave I/O Thread States

Waiting for master update The initial state before Connecting to master. Connecting to master The thread is attempting to connect to the master. Checking master version A state that occurs very briefly, after the connection to the master is established. Registering slave on master A state that occurs very briefly after the connection to the … Read more

Change default MySQL Data Directory in Linux

MySQL Cluster

Mostly MySQL uses /var/lib/mysql directory as default data directory for Linux based systems We are showing here how to change the default directory to different directory. Follow the below steps to make all the changes. In some cases service name, default data directory or MySQL configuration file path change. So use all the command as … Read more

Dumping MySQL Stored Procedures, Functions and Triggers

MySQL  has introduced some new interesting features, like stored procedures and triggers. I will show in this small post how we can backup and restore these components using mysqldump. What is Stored Procedure ? A stored procedure, by definition, is a segment of declarative SQL code which is stored in the database catalog and can … Read more

How can I stop a running MySQL query?

I connect to mysql from my Linux shell. Every now and then I run a SELECT query that is too big. It prints and prints and I already know this is not what I meant. I would like to stop the query. Hitting Ctrl+C (a couple of times) kills mysql completely and takes me back … Read more

MYSQL Partitioning : What is and HOW To ?

MySQL Cluster

The idea behind partitioning isn’t to use multiple servers but to use multiple tables instead of one table. You can divide a table into many tables so that you can have old data in one sub table and new data in another table. Then the database can optimize queries where you ask for new data … Read more

What is the best way to reduce the size of ibdata in mysql?

MySQL Cluster

The busiest file in the InnoDB infrastructure is /var/lib/mysql/ibdata1 This file normally houses many classes of information (when innodb_file_per_table is 0) Table Data Table Indexes MVCC (Multiversioning Concurrency Control) Data Rollbacks Segments Undo Tablespace Table Metadata Many people create multiple ibdata files hoping for better diskspace management and performance. It does not help. Unfortunately, OPTIMIZE TABLE against … Read more