1: Two cloud hosts have been purchased in advance
10.4.14.168 101.69.178.208 [Unicom] Master
10.4.5.9 101.69.178.219 [Unicom] Slave
2: Install MySQL separately
#Yum Install Mysql-server–enablerepo=remi
#Yum Install Mysql-devel
3: View MySQL installation status
[[email protected] ~] # Rpm-qa | grep mysql*
MySQL-5.1.73-3.el6_5.x86_64
MySQL-libs-5.1.73-3.el6_5.x86_64
MySQL-server-5.1.73-3.el6_5.x86_64
MySQL-devel-5.1.73-3.el6_5.x86_64
4: Start MySQL
Service mysqld Start
5: Log in to MySQL and change the password and delete the empty user
MySQL> UPDATEMySQL.User SETPassword=PASSWORD ('Ge0513.mysql')
-WHEREUser='Root';
Query OK,3Rows Affected (0.00Sec
Rows matched:3Changed:3Warnings:0
Mysql>SELECTUser, Host,password fromMysql.User;
+------+-------------+-------------------------------------------+
| User|Host|Password|
+------+-------------+-------------------------------------------+
|Root|localhost|*7ae39be5035d5c32361400ff7dedd757aa76896a|
|Root|Ten-4- --168| *7ae39be5035d5c32361400ff7dedd757aa76896a|
|Root|127.0.0.1|*7ae39be5035d5c32361400ff7dedd757aa76896a|
||localhost||
||Ten-4- --168 ||
+------+-------------+-------------------------------------------+
5RowsinchSet(0.00Sec
Mysql>DROPUser"'@localhost;
Query OK,0Rows Affected (0.00Sec
Mysql>DROPUser"'@'10-4-14-168';
Query OK,0Rows Affected (0.00Sec
MySQL builds master-slave on the cloud host