MySQL replication is a process that allows you to easily maintain multiple copies of MySQL data by having them copied automatically from a master to a slave database. This post assumes that you have a user with sudo privileges and have not installed MySQL. If you do have MySQL installed, then you can skip the installation step and move to the configuration of master/slave database: MySQL installation on the MASTER server Install MySQL server and MySQL client: # yum install mysql-community-server Connect to MySQL shell in order to create the new user “dbuser” and the database “testdb”: # mysql -u root -p mysql> create database testdb; mysql> grant usage on *.* to dbuser@localhost identified by ‘password’; mysql> grant all privileges on testdb.* to dbuser@localhost; mysql> exit; Edit the MySQL configuration file to allow remote connections to this server: # vi /etc/mysql/my.cnf Find the line “bind-address = 127.0.0.1” and comment it if it’s not...
Practical tips for smarter database work