Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Mysql mycat read-write separation

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Mysql mycat read-write separation:

Download URL: http://dl.mycat.io

Mycat official website: http://mycat.org.cn

Description:

10.0.1.2 are mycat servers, 10.0.1.3 and 10.0.1.4 are mysql servers

Yum install java-1.8.0-openjdktar zxfv Mycat-server-1.6.7.5-test-20200109231555-linux.tar.gz-C / space/

Configure read-write separation:

Vi / space/mycat/conf/schema.xml

Select user ()

: wq

Vi / space/mycat/conf/server.xml (mainly change the user part, other do not move)

0

0

one

one

0

0

three hundred

one

(?: (\ snext\ s+value\ s+for\ sMYCATSEQ_ (\ w +)) (, |) |\ s) *) +

False

Io.mycat.route.sequence.handler.HttpIncrSequenceHandler

0

0

0

64k

1k

0

384m

False

False

True

0

Xxxxxx ming ming

: wq

Vi / space/mycat/conf/rule.xml

one

: wq

Vi / space/mycat/conf/autopartition-long.txt

0-500M=0

# 500M-1000M=1

# 1000M-1500M=2

: wq

Start the service:

/ space/mycat/bin/mycat start

Check to see if log has reported any errors (if so, according to the error prompt):

Cat/ space/mycat/logs/wrapper.log

View the port:

Netstat-nplt | grep 8066 (8066 is a data port) netstat-nplt | grep 9066 (9066 is a management port)

Administrative commands:

Mysql-h 10.0.1.2-u ming-pendant xxxxxx'- P9066

Show @ @ help

Show @ @ version

Show @ @ datanode

Show @ @ heartbeat

Show @ @ datasource

Whether there is read-write separation can be seen by the number of READ_LOAD and WRITE_LOAD of different mysql servers in show @ @ datasource.

Read and write:

Mysql-h 10.0.1.2-u ming-pendant xxxxx'- P8066

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report