MySQL Skip Duplicate Replication Errors : skip replication error

mysql master - slave replication

Normally MySQL replication will stop whenever there is an error running a query on the slave. This happens in order for us to be able to identify the problem and fix it, and keep the data consistent with the mater that has sent the query. You can skip such errors, even if this is not recommended, as … Read more

Managing Views in MySQL : Showing mysql view definition

Summary: in this tutorial, you will learn how to manage views in MySQL including displaying, modifying and removing views. Show view definition in MySQL MySQL provides the SHOW CREATE VIEW statement that helps you show view definition. The following is the syntax of the SHOW CREATE VIEW statement:   1 SHOW CREATE VIEW [database_name].[view_ name]; To display the definition of a … Read more

mysql create user and grant permission

Create user  CREATE USER ‘super’@’%’ IDENTIFIED BY PASSWORD ‘*01A6717B58FF5C7EAFFF6CB7C96F7428EA65FE4C’; Grant Permission: GRANT ALL ON *.* TO easy@’10.0.20.212′; Flush Privileges: FLUSH PRIVILEGES  

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

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