MySQL:织物安装

  

MySQL织物安装

,

MySQL织物是甲骨文提供的用于辅助进行ha \分片的工具,它的基本架构:

,  MySQL:织物安装

,

,

从上面看的出,借助于织物,可以搭ha集建群,共享,ha +切分。

应用从织物中得知各个数据库、表,分区等的映射关系,然后访问相应的MySQL实例。

,

织物由三个组件组成:

1)织物的管理工具(也就是mysqlfabric)。

2)织物节点,可以启动1到多个节点。每个节点也是一个进程。用于处理织物的管理请求,应用的映射请求。

3)后备储存,它也是一个MySQL服务器,维护了ha组,分片组。

,

,

,

<强>下载

,

在MySQL 5.6之后的版本,可以使用织物的对应版本是1.5,在MySQL官网上可以直接下载。由于织物是由python语言编写的,并且内部通信用会用到mysql-connector python,所以也要下载对应的python驱动。

,,,,,,,,我下载的版本是:

 mysql - utiltities 1.5.6 el6.noarch.rpm——1.
  mysql - connector - ptyhon 2.0.4 - 1. - el6.noarch。rpm 

,

,

<强>安装

<强> 1 <>强,安装介质

使用操作系统根用户来安装。

先安装mysql-connector-ptyhon,再安装mysql-utilities:

 rpm 小姐;mysql - connector - ptyhon 2.0.4 el6.noarch.rpm——1.
  rpm 小姐mysql - utiltities 1.5.6 el6.noarch——1.。rpm 

<强> 2 <>强,配置文件

在安装好织物之后,就会有一个默认的配置文件:织物。cfg .

默认的配置文件的位置:

<强>平台

<强>包

<强>位置

Microsoft Windows

mysql-utilities-1.5.6-win32。msi

<强> UTILITIES_INSTALLDIR /etc/mysql/织物。cfg

14.04 Ubuntu Linux mysql-utilities_1.5.6-1ubuntu14.04_all.deb

/etc/mysql/织物。cfg Debian Linux 6.0

mysql-utilities_1.5.6-1debian6.0_all.deb

/etc/mysql/织物。cfg

Red Hat Enterprise Linux 6/Oracle Linux 6

mysql -工具- 1.5.6 - 1. - el6.noarch。rpm

/etc/mysql/织物。cfg OS X

mysql-utilities-1.5.6-osx10.9。dmg

/etc/mysql/织物。cfg

,

默认的配置文件预览:

(默认)
  prefix =/usr/当地
  sysconfdir =/usr/地方/等
  logdir =,/var/log
  
  (存储)
  时间=address  localhost: 3306
  user =fabric_store
  时间=password 秘密
  database =mysql_fabric
  auth_plugin =mysql_native_password
  connection_timeout =6
  connection_attempts =6
  connection_delay =1
  
  (服务器)
  user =fabric_server
  时间=password 秘密
  backup_user =fabric_backup
  时间=backup_password 秘密
  restore_user =fabric_restore
  时间=restore_password 秘密
  时间=unreachable_timeout  5
  
  (protocol.xmlrpc)
  时间=address  localhost: 32274
  时间=threads  5
  user =admin
  时间=password 秘密
  时间=disable_authentication 没有
  时间=realm  MySQL 织物
  ssl_ca =ssl_cert =ssl_key =(protocol.mysql)
  时间=address  localhost: 32275
  user =admin
  时间=password 秘密
  时间=disable_authentication 没有
  ssl_ca =ssl_cert =ssl_key =(执行器)
  时间=executors  5
  
  (日志)
  时间=level 信息
  时间=url 文件:///var/log/fabric.log
  
  (分片)
  mysqldump_program =/usr/bin/, mysqldump
  mysqlclient_program =/usr/bin/mysql
  
  (统计)
  prune_time =3600
  
  (failure_tracking)
  notifications =300
  notification_clients =50
  notification_interval =60
  failover_interval =0
  时间=detections  3
  detection_interval =6
  detection_timeout =1
  prune_time =3600
  
  (连接器)
  ttl =, 1 

在(存储)区域,用来配置后备储存mysql服务器的信息。所以这里配置的就是后备储存mysql服务器的操作帐户。

该用户必需的权限:

 ALTER ,,,,,,,,,,,,,今天早上,ALTER  some  database  objectsCREATE ,,,,,,,,,,,,今天早上,create  most  database  objectsCREATE  VIEW ,,,,,,,今天早上,create  viewsDELETE ,,,,,,,,,,,,今天早上,delete  rowsDROP ,,,,,,,,,,,,,,今天早上,drop  most  database 对象
  null
  null
  null
  null
  null
  null
  null

MySQL:织物安装