Mycat安装部署

1、下载MyCat  https://github.com/MyCATApache/Mycat-download 选择合适的版本下载,目前我使用的是1.5.1版本

2、安装JDK 需要1.7 或者以上版本  http://blog.csdn.net/linlinv3/article/details/45060705

3、解压   tar -zxvf Mycat-server-1.5.1-RELEASE-20160622153300-linux.tar.gz  

其中JDK存放地址为:/home/lin/soft/jdk1.7.0_79 

MyCat存放地址为:/home/lin/soft/mycat

存放地址根据个人习惯自己放。

4、修改配置文件

 
 
  1. lin@lin190:~/soft/mycat/conf$ vim wrapper.conf
  2. wrapper.java.command=/home/lin/soft/jdk1.7.0_79/bin/java

配置环境变量

  
  
  1. export MYCAT_HOME=/home/lin/soft/mycat

5、启动MyCat

 
 
  1. lin@lin190:~/soft/mycat/bin$ ./mycat start
  2. Starting Mycat-server...

6、测试是否启动成功

 
 
  1. lin@lin190:~/soft/mycat/bin$ netstat -ntulp |grep 8066
  2. (Not all processes could be identified, non-owned process info
  3. will not be shown, you would have to be root to see it all.)
  4. tcp6       0      0 :::8066                 :::*                    LISTEN      25941/java      

myCat 使用的是8066端口,证明已经启动

7、安装mysql进行试验

安装步骤 http://blog.csdn.net/linlinv3/article/details/51774040

8、使用如下语句测试mycat与mysql的链接

mysql -utest -ptest -h127.0.0.1 -P8066 -DTESTDB

 
 
  1. lin@lin190:/home$ mysql -utest -ptest -h127.0.0.1 -P8066 -DTESTDB
  2. Reading table information for completion of table and column names
  3. You can turn off this feature to get a quicker startup with -A
  4. Welcome to the MySQL monitor.  Commands end with ; or \g.
  5. Your MySQL connection id is 1
  6. Server version: 5.5.8-mycat-1.5.1-RELEASE-20160622153300 MyCat Server (OpenCloundDB)
  7. Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
  8. Oracle is a registered trademark of Oracle Corporation and/or its
  9. affiliates. Other names may be trademarks of their respective
  10. owners.

注意:Linux 下部署安装 MySQL,默认不忽略表名大小写,需要手动到/etc/my.cnf 下配置 lower_case_table_names=1 使 Linux 环境下 MySQL 忽略表名大小写,否则使用 MyCAT 的时候会提示找不到表!


mycat 安装成功!




  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值