Verbatim large column https://www.dazhuanlan.com/2019/08/26/5d6335b52c369/
The last time I installed mariadb article on centos7 and turn the master-slave replication mode, which intends to use a separate read and write do mycat
mycat can now be commensurate like nginx as a reverse proxy, he may not be exposed ip database
surroundings:
IP addresses | effect |
---|---|
192.168.3.137 | mycat server, the primary database |
192.168.3.136 | From the database |
Installation mycat
-
Open mycat official website , select the version to download, I have here is 1.6.6
-
The package tar extract to the centos / usr / local / lower
添加环境变量
vi /etc/profile
export MYCAT_HOME=/usr/local/mycat
# 退出
source /etc/profile #使之生效
cd /usr/local/mycat/bin
./mycat start #启动
./mycat status #查看是否启动
Usually no problem
Configuration Environment
First, back up what two important documents, if broke can also restore
cd /usr/local/mycat/conf
cp ./server.xml ./server.xml.bak
cp ./schema.xml ./schema.xml.bak
Configuring user for remote login server.xml
vi /usr/local/conf/server.xml
Pulled Finally, modify the inside of the user on the line
Configuration table needs to be managed schema.xml
Test Connection
Restart the mycat, check whether state run
./mycat restart
./mycat status
Navicat open on the window select the connection must be noted here mysql or will be error
Trading success!