MySQL Replication by MySQL Rumi, June 27, 2011 The easiest and most straightforward method for setting up replication is to use new master and slave servers. You can also use this method if you are setting up new servers but have an existing dump of the databases from a different server that you want to load into your replication configuration. By loading the data into a new master, the data will be automatically replicated to the slaves. To set up replication between a new master and slave: Configure the MySQL master with the necessary configuration properties. See Section 15.1.1.1, “Setting the Replication Master Configuration”. Start up the MySQL master. Set up a user. See Section 15.1.1.3, “Creating a User for Replication”. Obtain the master status information. See Section 15.1.1.4, “Obtaining the Replication Master Binary Log Coordinates”. On the master, release the read lock: mysql> UNLOCK TABLES; On the slave, edit the MySQL configuration. See Section 15.1.1.2, “Setting the Replication Slave Configuration”. Start up the MySQL slave. Execute a CHANGE MASTER TO statement to set the master replication server configuration. See Section 15.1.1.10, “Setting the Master Configuration on the Slave”. Perform the slave setup steps on each slave. Because there is no data to load or exchange on a new server configuration you do not need to copy or import any information. If you are setting up a new replication environment using the data from a different existing database server, you will now need to run the dump file generated from that server on the new master. The database updates will automatically be propagated to the slaves: shell> mysql -h master < fulldb.dump http://dev.mysql.com/doc/refman/5.0/en/replication-howto-newservers.html Related MySQL
Exporting Percona Database March 11, 2020March 11, 2020 Exporting percona database is however a bit tricky way to make funcitonal. The usual- mysqldump -u root -p [database] > database.sql will stuck and shoot you many error. All you need is the add an extended parameters to execute the dump, and here it is: mysqldump -u root -p [database]… Read More
Installing MySQL on Debian September 26, 2020 Step 1 – Prerequisites Login to your Debian 9 system using shell access. For remote systems connect with SSH. Windows users can use Putty or other alternatives applications for SSH connection. ssh root@debian9 Run below commands to upgrade the current packages to the latest version. sudo apt update sudo apt… Read More
Install Percona XtraDB Cluster for MySQL 5.7 on Debian 8 February 18, 2019 First of all, why we choose three nodes and not only two? In any cluster, the number of nodes should be odd, so in the case of disconnection of a node, we assume that the highest group of servers has the fresh data, and should be replicated to the down node… Read More