MySQL Red hat linux

Setting up Galera Arbitrator

Galera Arbitrator <http://galeracluster.com/documentation-webpages/arbitrator.html> is a member of Percona XtraDB Cluster that is used for voting in case you have a small number of servers (usually two) and don’t want to add any more resources. Galera Arbitrator does not need a dedicated server. It can be installed on a machine running some other application. Just make sure it has […]

MySQL Red hat linux

How to re-sync the Mysql DB if Master and slave have different database incase of Mysql replication?

This is the full step-by-step procedure to resync a master-slave replication from scratch: At the master: And copy the values of the result of the last command somewhere. Without closing the connection to the client (because it would release the read lock) issue the command to get a dump of the master: Now you can release the […]

MySQL Red hat linux

Upgrade MySQL to Version 5.6 in CentOS

Backup all the database and stop mysql mysqldump -u (userid) -p (password) –all-databases > all-databases.sql service mysqld stop Download the Repo for MySql 5.6 wget http://dev.mysql.com/get/mysql-community-release-el6-3.noarch.rpm/from/http://repo.mysql.com/ Install the repository from the local file yum localinstall mysql-community-release-el6-3.noarch.rpm Install the latest MySql yum install mysql-community-server service mysqld start Configure MySQL to start automatically on Server Reboot chkconfig […]

MySQL

Install and Configure MySQL Cluster on CentOS 7

MySQL Cluster is designed to provide a MySQL compatible database with high availability and low latency. The MySQL Cluster technology is implemented through the NDB (Network DataBase) and NDBCLUSTER storage engines and provides shared-nothing clustering and auto-sharding for MySQL database systems. In the shared-nothing architecture, each of nodes has its own memory and disk, the […]

MySQL Red hat linux

Password Validation Plugin in MySQL

The validate_password plugin serves to test passwords and improve security. The plugin exposes a set of system variables that enable you to define password policy. First check the plugin directory of MySQL. mysql> show variables like “plugin%”; +—————+————————–+ | Variable_name | Value | +—————+————————–+ | plugin_dir | /usr/lib64/mysql/plugin/ | +—————+————————–+ 1 row in set (0.00 […]

MySQL Red hat linux

MySQL Master-Master Replication

Create MySQL user CREATE USER ‘droaming’@’localhost’ IDENTIFIED BY ‘DroamG.123’; CREATE USER ‘droaming’@’%’ IDENTIFIED BY ‘DroamG.123’; Drop Mysql User DROP USER ‘droaming’@’localhost’; DROP USER ‘droaming’@’%’; Create Mysql Database and grant permission CREATE DATABASE droaming; GRANT ALL ON droaming.* TO ‘droaming’@’localhost’; View MySQL users SELECT User, Host, Password FROM mysql.user; MySQL Master-Master Replication SERVER 01 [mysqld] datadir=/var/lib/mysql […]