加入收藏 | 设为首页 | 会员中心 | 我要投稿 济南站长网 (https://www.0531zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MySql教程 > 正文

Mysql复制实现,读写分离讲解以及安装失败

发布时间:2016-09-28 19:33:09 所属栏目:MySql教程 来源:站长网
导读:副标题#e# 注意:这是安装失败版,所以mysql-proxy安装的过程就没必要看了。 已经讲过了mysql主从同步 Atlas 官方文档:http://dev.mysql.com/doc/refman/5.1/en/mysql-proxy.html mysql-proxy-0.8.1 写主机也提供读 mysql-proxy-0.8.2 写主机单纯写 用MySQ

FAQ:

1、在负载平衡mysql-proxy,我怎么能分开读不能写?

执行读取或写入到不同的后端服务器的查询有没有自动分离。但是,您可以到mysql代理指定的一个或多个的“后端”MySQL服务器是只读的。

2、Mysql版本在5.0以上

3、守护进程--dearm选项

4、可以单独服务器上运行,也可以运行在dbserver上面

5、没有特别的定制的话,整个连接会发送到相同的服务器,保持整个连接状态完好。

6、Lua是快速,对于大多数应用应该足够小的开销。原始数据包的开销是400微秒左右。

7、可以改变脚本和代理将重新加载它,当客户端连接。

8、mysql proxy 不处理SSL连接

9、最大连接数由 max_connections来控制。

从源码安装:

依赖:

libevent 1.x or higher (1.3b or later is preferred).
lua 5.1.x or higher.
glib2 2.6.0 or higher.
pkg-config.
libtool 1.5 or higher.
MySQL 5.0.x or higher developer files.
shell>yum install -y gcc gcc-c++ make mysql mysql-server mysql-devel
shell>yum install -y libevent-devel lua-devel pkg-config glib2 libtool
shell> tar zxf mysql-proxy-0.8.2.tar.gz
shell> cd mysql-proxy-0.8.2
shell> ./configure --prefix=/usr/local/mysql-proxy --with-mysql=/usr/local/mysql5.5.32/bin/mysql_config
shell> make
To test the build, use the check target to make:
shell> make check
The tests try to connect to localhost using the root user. To provide a password, set the MYSQL_PASSWORD environment variable:
shell> MYSQL_PASSWORD=root_pwd make check
You can install using the install target:
shell> make install
By default, mysql-proxy is installed into /usr/local/sbin/mysql-proxy. The Lua example scripts are installed into /usr/local/share.

(编辑:济南站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

热点阅读