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
How to gracefully reboot MariaDB Galera Cluster servers?
Cluster Configuration In this example configuration of two nodes, we assume that the servers are connected over private network. This allows direct connections without requiring SSH tunnels. The most important parts is to enable listening on IP protocol and to configure addresses and names of the cluster nodes. The config files are similar for each […]
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 […]
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 […]
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 […]
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 […]
Purge binary logs in MySQL
Please do not just delete them in the OS. You need to let mysqld do that for you. Here is how mysqld manages it: The file mysql-bin.[index] keeps a list of all binary logs mysqld has generated and auto-rotated. The mechanisms for cleaning out the binlogs in conjunction with mysql-bin.[index] are: PURGE BINARY LOGS TO […]
MySQL Master-Master Replication Bug – ERROR 1872
Description: When i tried to configurate a crash safe slave with MTS and GTID based replication, but after a OS crash replication failed to be start. error log: ——————————— 2016-10-26 21:00:23 2699 [Warning] Neither –relay-log nor –relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname […]
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 […]
Password less command line scripts with MySQL 5.6
I have a number of command line scripts that copy MySQL databases down from staging servers and store them locally. These scripts set the password on the command line using the -p option. With MySQL 5.6, a new warning is displayed every time my scripts run: Warning: Using a password on the command line interface […]