阿里狼 发表于 2018-10-9 12:49:35

MySQL中间件Atlas安装及使用

# 编写简单的Atlas启动脚本vim /etc/init.d/atlas#!/bin/shstart(){  
      /usr/local/mysql-proxy/bin/mysql-proxyd test start}stop(){
  
      /usr/local/mysql-proxy/bin/mysql-proxyd test stop}status(){
  
      /usr/local/mysql-proxy/bin/mysql-proxyd test status
  
}restart(){
  
      /usr/local/mysql-proxy/bin/mysql-proxyd test restart} ATLAS="/usr/local/mysql-proxy/bin/mysql-proxyd"[ -f $ATLAS ] || exit 1
  
# See how we were called.case "$1" in
  
      start)
  
                start
  
                ;;
  
      stop)
  
                stop
  
                ;;
  
      restart)
  
                restart
  
                ;;
  
      status)
  
                status
  
                ;;
  
                # stop    sleep 3   start;;
  
      *)
  
                echo $"Usage: $0 {start|stop|status|restart}"
  
                exit 1
  
esacexit 0
  

  
# atlas服务验证service atlas statusservice atlas startservice atlas restartservice atlas stop


页: [1]
查看完整版本: MySQL中间件Atlas安装及使用