mysql主从之基于mycat实现读写分离

一 环境  

1.1 结构

192.168.132.125 mycat

192.168.132.121  master

192.168.132.122  slave

主从已经配置完成

1.2 安装mycat

192.168.132.125安装mycat

[root@mycat ~]#   cd /usr/local/src/

[root@mycat src]# wget http://dl.mycat.io/1.6-RELEASE/Mycat-server-1.6-RELEASE-20161028204710-linux.tar.gz

[root@mycat src]# tar -xf Mycat-server-1.6-RELEASE-20161028204710-linux.tar.gz

[root@mycat src]# cd mycat/

[root@mycat mycat]# ll

drwxr-xr-x. 2 root root  190 Jul 12 08:50 bin
drwxrwxrwx. 2 root root    6 Feb 29  2016 catlet
drwxrwxrwx. 4 root root 4096 Jul 12 08:50 conf
drwxr-xr-x. 2 root root 4096 Jul 12 08:50 lib
drwxrwxrwx. 2 root root    6 Oct 28  2016 logs
-rwxrwxrwx. 1 root root  217 Oct 28  2016 version.txt

1.3 配置mycat

[root@mycat mycat]# cd conf/

[root@mycat conf]# ll

-rwxrwxrwx. 1 root root   88 Oct 28  2016 autopartition-long.txt
-rwxrwxrwx. 1 root root   48 Oct 28  2016 auto-sharding-long.txt
-rwxrwxrwx. 1 root root   62 Oct 28  2016 auto-sharding-rang-mod.txt
-rwxrwxrwx. 1 root root  334 Oct 28  2016 cacheservice.properties
-rwxrwxrwx. 1 root root  439 Oct 28  2016 ehcache.xml
-rwxrwxrwx. 1 root root 2132 Oct 28  2016 index_to_charset.properties
-rwxrwxrwx. 1 root root 1246 Oct 10  2016 log4j2.xml
-rwxrwxrwx. 1 root root  178 Oct 28  2016 migrateTables.properties
-rwxrwxrwx. 1 root root  246 Oct 28  2016 myid.properties
-rwxrwxrwx. 1 root root   15 Oct 28  2016 partition-hash-int.txt
-rwxrwxrwx. 1 root root  102 Oct 28  2016 partition-range-mod.txt
-rwxrwxrwx. 1 root root 4794 Oct 28  2016 rule.xml
-rwxrwxrwx. 1 root root 4219 Oct 28  2016 schema.xml     #主要配置这个文件
-rwxrwxrwx. 1 root root  413 Oct 28  2016 sequence_conf.properties
-rwxrwxrwx. 1 root root   75 Oct 28  2016 sequence_db_conf.properties
-rwxrwxrwx. 1 root root   27 Oct 28  2016 sequence_distributed_conf.properties
-rwxrwxrwx. 1 root root   51 Oct 28  2016 sequence_time_conf.properties
-rwxrwxrwx. 1 root root 3717 Oct 28  2016 server.xml
-rwxrwxrwx. 1 root root   16 Oct 28  2016 sharding-by-enum.txt
-rwxrwxrwx. 1 root root 4182 Oct 28  2016 wrapper.conf
drwxrwxrwx. 2 root root 4096 Jul 12 08:50 zkconf
drwxrwxrwx. 2 root root   36 Jul 12 08:50 zkdownload

[root@mycat conf]# cat schema.xml

<?xml version="1.0"?>
<!DOCTYPE mycat:schema SYSTEM "schema.dtd">
<mycat:schema xmlns:mycat="http://io.mycat/">
<!‐‐ TESTDB 表示mycat 的逻辑数据库名称当schema 节点没有子节点table 的时候,一定要有dataNode 属性存在‐‐>
    <schema name="TESTDB" checkSQLschema="false" sqlMaxLimit="100" dataNode="dn1">    
    </schema>

    <dataNode name="dn1" dataHost="localhost1" database="master1" />

    <dataHost name="localhost1" maxCon="1000" minCon="10" balance="3"
              writeType="0" dbType="mysql" dbDriver="native" switchType="1"  slaveThreshold="100">
        <heartbeat>select user()</heartbeat>
        <!-- can have multi write hosts -->
        <writeHost host="hostM1" url="192.168.132.121:3306" user="root"
                   password="123456">
            <!-- can have multi read hosts -->
            <readHost host="hostS2" url="192.168.132.122:3306" user="root" password="123456" />
        </writeHost>

    </dataHost>

</mycat:schema>

注意 dataHost 节点的下面三个属性balance, switchType, writeType

balance="0", 不开启读写分离机制,所有读操作都发送到当前可用的writeHost 上。

balance="1",全部的readHost 与stand by writeHost 参与select语句的负载均衡,简单的说,当双主双从模式(M1‐>S1,M2‐>S2,并且M1 与M2 互为主备),正常情况下,M2,S1,S2都参与select 语句的负载均衡。

balance="2",所有读操作都随机的在writeHost、readhost 上分发。

balance="3",所有读请求随机的分发到writeHost 下的readhost 执行,writeHost 不负担读压力

writeType 表示写模式

writeType="0",所有的操作发送到配置的第一个writehost

writeType="1",随机发送到配置的所有writehost

writeType="2",不执行写操作

switchType 指的是切换的模式,目前的取值也有4 种:

switchType=‘‐1‘ 表示不自动切换

switchType=‘1‘ 默认值,表示自动切换

switchType=‘2‘ 基于MySQL 主从同步的状态决定是否切换,心跳语句为show slave status

switchType=‘3‘基于MySQL galary cluster 的切换机制(适合集群)(1.4.1),心跳语句为show status like ‘wsrep%‘。

配置端口,用户名

[root@mycat conf]# vim server.xml 

<?xml version="1.0" encoding="UTF-8"?>
<!-- - - Licensed under the Apache License, Version 2.0 (the "License"); 
        - you may not use this file except in compliance with the License. - You 
        may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 
        - - Unless required by applicable law or agreed to in writing, software - 
        distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT 
        WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the 
        License for the specific language governing permissions and - limitations 
        under the License. -->
<!DOCTYPE mycat:server SYSTEM "server.dtd">
<mycat:server xmlns:mycat="http://io.mycat/">
        <system>
        <property name="useSqlStat">0</property>  <!-- 1为开启实时统计、0为关闭 -->
        <property name="useGlobleTableCheck">0</property>  <!-- 1为开启全加班一致性检测、0为关闭 -->

                <property name="sequnceHandlerType">2</property>
      <!--  <property name="useCompression">1</property>--> <!--1为开启mysql压缩协议-->
        <!--  <property name="fakeMySQLVersion">5.6.20</property>--> <!--设置模拟的MySQL版本号-->
        <!-- <property name="processorBufferChunk">40960</property> -->
        <!-- 
        <property name="processors">1</property> 
        <property name="processorExecutor">32</property> 
         -->
                <!--默认为type 0: DirectByteBufferPool | type 1 ByteBufferArena-->
                <property name="processorBufferPoolType">0</property>
                <!--默认是65535 64K 用于sql解析时最大文本长度 -->
                <!--<property name="maxStringLiteralLength">65535</property>-->
                <!--<property name="sequnceHandlerType">0</property>-->
                <!--<property name="backSocketNoDelay">1</property>-->
                <!--<property name="frontSocketNoDelay">1</property>-->
                <!--<property name="processorExecutor">16</property>-->
                <!--
                <property name="handleDistributedTransactions">0</property>
                <!--                     off heap for merge/order/group/limit      1开启   0关闭            -->
                <property name="useOffHeapForMerge">1</property>
                <!--                        单位为m                -->
                <property name="memoryPageSize">1m</property>
                <!--                        单位为k                -->
                <property name="spillsFileBufferSize">1k</property>
                <property name="useStreamOutput">0</property>
                <!--                        单位为m                -->
                <property name="systemReserveMemorySize">384m</property>
                <!--是否采用zookeeper协调切换  -->
                <property name="useZKSwitch">true</property>
        </system>
        <!-- 全局SQL防火墙设置 -->
        <!-- 
        <firewall> 
           <whitehost>
              <host host="127.0.0.1" user="mycat"/>
              <host host="127.0.0.2" user="mycat"/>
           </whitehost>
       <blacklist check="false">
       </blacklist>
        </firewall>
        -->
        <user name="root">
                <property name="password">123456</property>
                <property name="schemas">TESTDB</property>
                <!-- 表级 DML 权限设置 -->
                <!--            
                <privileges check="false">
                        <schema name="TESTDB" dml="0110" >
                                <table name="tb01" dml="0000"></table>
                                <table name="tb02" dml="1111"></table>
                        </schema>
                </privileges>           
                 -->
        </user>
        <user name="user">
                <property name="password">user</property>
                <property name="schemas">TESTDB</property>
                <property name="readOnly">true</property>
        </user>
</mycat:server

二 验证

2.1 启动Mycat

[root@mycat conf]# ../bin/mycat start

2.2 日志

[root@mycat conf]# cat /usr/local/src/mycat/logs/wrapper.log

STATUS | wrapper  | 2019/07/12 10:44:55 | --> Wrapper Started as Daemon
STATUS | wrapper  | 2019/07/12 10:44:55 | Launching a JVM...
ERROR  | wrapper  | 2019/07/12 10:45:12 | Unable to start JVM: No such file or directory (2)   #没有JVM,安装java
ERROR  | wrapper  | 2019/07/12 10:45:12 | JVM exited while loading the application.
FATAL  | wrapper  | 2019/07/12 10:45:12 | There were 5 failed launches in a row, each lasting less than 300 seconds.  Giving up.
FATAL  | wrapper  | 2019/07/12 10:45:12 |   There may be a configuration problem: please check the logs.
STATUS | wrapper  | 2019/07/12 10:45:12 | <-- Wrapper Stopped

[root@mycat conf]# yum -y install java

[root@mycat conf]# ../bin/mycat start

[root@mycat conf]# tail -f /usr/local/src/mycat/logs/wrapper.log

INFO   | jvm 1    | 2019/07/12 11:02:46 | 2019-07-12 11:02:46,389 [INFO ][$_NIOREACTOR-0-RW] connectionAcquired MySQLConnection [id=12, lastTime=1562943766373, user=root, schema=master1, old shema=master1, borrowed=false, fromSlaveDB=true, threadId=1428, charset=latin1, txIsolation=3, autocommit=true, attachment=null, respHandler=null, host=192.168.132.122, port=3306, statusSync=null, writeQueue=0, modifiedSQLExecuted=false]  (io.mycat.backend.mysql.nio.handler.NewConnectionRespHandler:NewConnectionRespHandler.java:45) 
INFO   | jvm 1    | 2019/07/12 11:02:46 | MyCAT Server startup successfully. see logs in logs/mycat.log

2.3 连接,端口为8066

[root@mycat ~]# mysql -uroot -p1234567 -h192.168.132.125  -P8066

MySQL [(none)]> show databases;
+----------+
| DATABASE |
+----------+
| TESTDB   |
+----------+

2.4 写入数据测试

MySQL [(none)]> use TESTDB;
MySQL [TESTDB]> show tables;
MySQL [TESTDB]> select * from test;
MySQL [TESTDB]> insert  into test values (555);
MySQL [TESTDB]> select * from test;
+------+
| id   |
+------+
|    1 |
|    2 |
|    2 |
|    2 |
|   11 |
|   12 |
|  111 |
|  222 |
|  333 |
|  444 |
|  555 |
+------+
mater查看
mysql> select * from master1.test;
+------+
| id   |
+------+
|    1 |
|    2 |
|    2 |
|    2 |
|   11 |
|   12 |
|  111 |
|  222 |
|  333 |
|  444 |
|  555 |
+------+
slave查看
mysql> select * from master1.test;
+------+
| id   |
+------+
|    1 |
|    2 |
|    2 |
|    2 |
|   11 |
|   12 |
|  111 |
|  222 |
|  333 |
|  444 |
|  555 |
+------+

成功写入数据

2.5 验证读写分离

修改日志级别为debug

[root@mycat conf]# vim log4j2.xml

<Loggers>
        <!--<AsyncLogger name="io.mycat" level="info" includeLocation="true" additivity="false">-->
            <!--<AppenderRef ref="Console"/>-->
            <!--<AppenderRef ref="RollingFile"/>-->
        <!--</AsyncLogger>-->
        <asyncRoot level="debug" includeLocation="true">

            <AppenderRef ref="Console" />
            <AppenderRef ref="RollingFile"/>

        </asyncRoot>
    </Loggers>

[root@mycat conf]# /usr/local/src/mycat/bin/mycat stop

[root@mycat conf]# /usr/local/src/mycat/bin/mycat start

写入一个数据

MySQL [TESTDB]> insert  into test values (666);

[root@mycat conf]# tail -f /usr/local/src/mycat/logs/wrapper.log

INFO   | jvm 1    | 2019/07/12 11:15:06 | 2019-07-12 11:15:06,662 [DEBUG][$_NIOREACTOR-0-RW] con need syn ,total syn cmd 1 commands SET names utf8;schema change:false con:MySQLConnection [id=7, lastTime=1562944506662, user=root, schema=master1, old shema=master1, borrowed=true, fromSlaveDB=false, threadId=14906, charset=utf8, txIsolation=3, autocommit=true, attachment=dn1{insert  into test values (666)}, respHandler=SingleNodeHandler [node=dn1{insert  into test values (666)}, packetId=0], host=192.168.132.121, port=3306, statusSync=null, writeQueue=0, modifiedSQLExecuted=true]  (io.mycat.backend.mysql.nio.MySQLConnection:MySQLConnection.java:448) 
INFO   | jvm 1    | 2019/07/12 11:15:06 | 2019-07-12 11:15:06,668 [DEBUG][$_NIOREACTOR-1-RW] release connection MySQLConnection [id=7, lastTime=1562944506646, user=root, schema=master1, old shema=master1, borrowed=true, fromSlaveDB=false, threadId=14906, charset=utf8, txIsolation=3, autocommit=true, attachment=dn1{insert  into test values (666)}, respHandler=SingleNodeHandler [node=dn1{insert  into test values (666)}, packetId=1], host=192.168.132.121, port=3306, statusSync=null, writeQueue=0, modifiedSQLExecuted=true]  (io.mycat.server.NonBlockingSession:NonBlockingSession.java:341) 
INFO   | jvm 1    | 2019/07/12 11:15:06 | 2019-07-12 11:15:06,669 [DEBUG][$_NIOREACTOR-1-RW] release channel MySQLConnection [id=7, lastTime=1562944506646, user=root, schema=master1, old shema=master1, borrowed=true, fromSlaveDB=false, threadId=14906, charset=utf8, txIsolation=3, autocommit=true, attachment=null, respHandler=null, host=192.168.132.121, port=3306, statusSync=null, writeQueue=0, modifiedSQLExecuted=false]  (io.mycat.backend.datasource.PhysicalDatasource:PhysicalDatasource.java:442) 
INFO   | jvm 1    | 2019/07/12 11:15:14 | 2019-07-12 11:15:13,968 [DEBUG][Timer1] con query sql:select user() to con:MySQLConnection [id=3, lastTime=1562944513968, user=root, schema=master1, old shema=master1, borrowed=true, fromSlaveDB=false, threadId=14907, charset=latin1, txIsolation=3, autocommit=true, attachment=null, respHandler=null, host=192.168.132.121, port=3306, statusSync=null, writeQueue=0, modifiedSQLExecuted=false]  (io.mycat.sqlengine.SQLJob:SQLJob.java:88)

发现在192.168.132.121 主数据库上面

查找数据

MySQL [TESTDB]> select * from test;

INFO   | jvm 1    | 2019/07/12 11:20:13 | 2019-07-12 11:20:13,419 [DEBUG][$_NIOREACTOR-0-RW] con need syn ,total syn cmd 1 commands SET names utf8;schema change:false con:MySQLConnection [id=15, lastTime=1562944813419, user=root, schema=master1, old shema=master1, borrowed=true, fromSlaveDB=true, threadId=1596, charset=utf8, txIsolation=3, autocommit=true, attachment=dn1{select * from test}, respHandler=SingleNodeHandler [node=dn1{select * from test}, packetId=0], host=192.168.132.122, port=3306, statusSync=null, writeQueue=0, modifiedSQLExecuted=false]  (io.mycat.backend.mysql.nio.MySQLConnection:MySQLConnection.java:448) 
INFO   | jvm 1    | 2019/07/12 11:20:13 | 2019-07-12 11:20:13,421 [DEBUG][$_NIOREACTOR-0-RW] release connection MySQLConnection [id=15, lastTime=1562944813407, user=root, schema=master1, old shema=master1, borrowed=true, fromSlaveDB=true, threadId=1596, charset=utf8, txIsolation=3, autocommit=true, attachment=dn1{select * from test}, respHandler=SingleNodeHandler [node=dn1{select * from test}, packetId=16], host=192.168.132.122, port=3306, statusSync=io.mycat.backend.mysql.nio.MySQLConnection$StatusSync@3055d901, writeQueue=0, modifiedSQLExecuted=false]  (io.mycat.server.NonBlockingSession:NonBlockingSession.java:341) 

在salve192.168.132.122从数据库上面,读和写在不同的服务器上面

2.6 问题

但这种方式有个问题,即master 挂了以后,slave 也不能提供读和写服务Slave 挂了 不能查询,但是可以插入。

停掉主数据库

[root@master1 ~]# systemctl stop mysqld

[root@mycat ~]# mysql -uroot -p1234567 -h192.168.132.125  -P8066 TESTDB

MySQL [TESTDB]> select * from test;
ERROR 1184 (HY000): Connection refused
MySQL [TESTDB]> insert into test values (777);
ERROR 1184 (HY000): Connection refused

已经不能查询,也不可以插入

停掉slave

不可以查,但是可以写

[root@slave ~]# systemctl stop mysqld

MySQL [TESTDB]> select * from test;
ERROR 1184 (HY000): Connection refused
MySQL [TESTDB]> insert  into test values (777);
Query OK, 1 row affected (0.00 sec)

读写分离配置完成

这种结构过于简单,但是实现了读写分离的功能,生产中需要综合考虑单点故障的问题,需要更可靠的架构!

原文地址:https://www.cnblogs.com/zyxnhr/p/11179017.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Mycat是什么?MyCat是一个开源的分布式数据库系统,是一个实现了MySQL协议的服务器,前端用户可以把它看作是一个数据库代理,用MySQL客户端工具和命令行访问,而其后端可以用MySQL原生协议与多个MySQL服务器通信,也可以用JDBC协议与大多数主流数据库服务器通信,其核心功能是分表分库,即将一
转自:https://www.cnblogs.com/ivictor/p/5111495.html参考:https://www.cnblogs.com/damumu/p/7320258.htmlMyCAT是mysql中间件,前身是阿里大名鼎鼎的Cobar,Cobar在开源了一段时间后,不了了之。于是MyCAT扛起了这面大旗,在大数据时代,其重要性愈发彰显。这篇文章主要是MyCAT的入门部署
1.在数据库做好主从同步的情况下搭建mycat。下载mycat,解压。修改server.xml文件,修改schema.xml待完善启动mycat。参考文章:https://blog.csdn.net/yelllowcong/article/details/79063546https://www.cnblogs.com/NingKangMing/p/6143834.html
集群的服务器列表在10.11.0.210和10.11.0.216中部署mycat和haproxy(因为实验机器性能有限,实际生产环境中需要单独用服务做haproxy反向代理) 两台机器的Mycat配置和haproxy保持一致即haproxyàmycatàpxc集群àmysql分片 Mycat的相关配置Server.xml[root@node6
Mycat是什么?·一个彻底开源的,面向企业应用开发的大数据库集群·支持事务、ACID、可以替代MySQL的加强版数据库·一个可以视为MySQL集群的企业级数据库,用来替代昂贵的Oracle集群·一个融合内存缓存技术、NoSQL技术、HDFS大数据的新型SQLServer·结合传统数据库和新型分布式数
<system>配置Mycat系统参数 <system>  <propertyname="serverPort">3306</property><!--mycat服务端口-->  <propertyname="managerPort">9066</property><!--mycat管理端口-->  <propertyname=&q
数据库中间件:mycat逻辑库:即mycat服务上的数据库,并非实际mysql服务上的数据库。逻辑表:与逻辑库同理。数据节点:是mycat逻辑表与mysql物理表的对应关系,mycat服务上某个库中的某个表的数据可能是由不同mysql服务器上数据库中表的数据组成。具体哪个逻辑表对应mysql的哪个实际
MyCat的官方网站:http://www.mycat.org.cn/下载地址:https://github.com/MyCATApache/Mycat-download第一步:下载wget http://dl.mycat.io/1.6-RELEASE/Mycat-server-1.6-RELEASE-20161028204710-linux.tar.gz 并解压Mycat-server-1.6-RELEASE-20161028204710-linux.tar.gz
show@@sql;Emptyset(0.01sec)一直查不出数据查看在Mycat中执行过的SQL语句,需要确认server.xml配置文件中的<propertyname="useSqlStat">1</property>刚开始一直出不来数据,最后发现是没开启的原因。。。。。。1. 连接mycat9066管理端口   mysql-h127.0.0.1-
Mysql分布式集群部署mycat分库分表系列(共三套)系列一:《分布式集群+分库分表实战教程》本套课程将通过分布式集群和分库分表两部分内容进行讲解1、主要解决针对大型网站架构中持久化部分中,大量数据存储以及高并发访问所带来是数据读写问题。分布式是将一个业务拆分为多个子业务
1、下载系统安装包选择相应的版本进行下载,地址:http://dl.mycat.io/ 。Mycat数据库分库分表中间件介绍 http://www.mycat.io/2、安装安装mycat前需要保证系统已安装过jdk和mysql,将下载好的mycat安装包解压到某个目录下,然后进入mycat解压目录下的bin目录(打开cmd控制台确保是以管
原文:学会数据库读写分离、分表分库https://www.cnblogs.com/joylee/p/7513038.html系统开发中,数据库是非常重要的一个点。除了程序的本身的优化,如:SQL语句优化、代码优化,数据库的处理本身优化也是非常重要的。主从、热备、分表分库等都是系统发展迟早会遇到的技术问题问题。Mycat
MyCAT是mysql中间件,前身是阿里大名鼎鼎的Cobar,Cobar在开源了一段时间后,不了了之。于是MyCAT扛起了这面大旗,在大数据时代,其重要性愈发彰显。这篇文章主要是MyCAT的入门部署。  随着互联网应用的广泛普及,海量数据的存储和访问成为了系统设计的瓶颈问题。对于一个大型的互联网应
MyCat安装配置学习1.下载安装tar解压(不多说)2.MyCat命令./mycatstart启动./mycatstop停止./mycatrestart重启配置server.xml添加用户设置配置schema.xml
1.Mycat入门官网http://www.mycat.io/1.1.什么是Mycat一个彻底开源的,面向企业应用开发的大数据库集群支持事务、ACID、可以替代MySQL的加强版数据库一个可以视为MySQL集群的企业级数据库,用来替代昂贵的Oracle集群一个融合内存缓存技术、NoSQL技术、HDFS大数据的新型SQL
因为51博客写作格式问题,以后文档都以有道文档连接为主,已整理到有道云笔记,目前笔记有云计算运维大数据运维,应用运维,DBA,测试,小白想学的可以加我qq:936172842,,请注明51学友,无备注一律不加,http:/ote.youdao.comoteshare?id=935db6cec339054c82d8b3f6ac343fa0⊂=DBB78851CCCF486EB26B
MyCat简介前面文章我们提到,如果数据量比较大的话,我们需要对数据进行分库分表,分完之后,原本存在一个数据库中的数据,现在就存在多个数据库中了,就像下面这样:  那么此时MyCat所扮演的角色就是分布式数据库中间件!MyCat是一个开源的分布式数据库中间件,它实现了MySQL协议,在开发
一、自定义类加载器在复杂类情况下的运行分析1、使用之前创建的类加载器publicclassMyTest16extendsClassLoader{privateStringclassName;//目录privateStringpath;privatefinalStringfileExtension=".class";publicMyTest16(Stringclass
mycat是一个中间层mycat不存储任何数据,所有数据存储在mysql中mycat对于开发人员来说就是mysql,但mycat不能支持所有mysql语句mycat可以实现对后端数据库的分库分表和读写分离、负载均衡mycat对前端应用隐藏了后端数据库的存储逻辑(比如对后端数据读写分离,如果在程序中实现,则每一个使
下载:https://github.com/MyCATApache/Mycat-download安装:直接解压运行命令:linux:   ./mycatstart启动   ./mycatstop停止   ./mycatconsole前台运行   ./mycatrestart重启服务   ./mycatpause暂停   ./mycatstatus查看启动状态windows: