Deploying MyCAT Read/Write Splitting
- Create a test database and a test table.
- Connect to the MySQL database.
1/usr/local/mysql/bin/mysql -uroot -p123456 -S /data/mysql/run/mysqlm.sock
- Create a test database and a test table.
1 2 3 4 5 6 7
create database sysbench; use sysbench; CREATE TABLE `test1` ( `id` bigint(20) NOT NULL, `report_hostname` varchar(100) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
- Confirm that data is synchronized to the secondary database.
1 2 3 4
/usr/local/mysql/bin/mysql -uroot -p123456 -S /data/mysql/run/mysqls.sock show databases; use sysbench; show tables;

- Connect to the MySQL database.
Parent topic: MySQL Database Read/Write Splitting Scheme