dbproxy安装问题记录

在尝试安装和编译DBProxy源码时遇到了一些问题,包括使用git克隆仓库,运行autogen.sh在特定Docker环境下失败,执行bootstrap.sh报错,以及在make && make install过程中因CLIENT_SECURE_CONNECTION导致的错误。解决方法包括修改bootstrap.sh脚本,注释掉某些代码段,并导入mysql5.7的库文件以修复链接问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

源码从代码仓库下载到本地
git clone git@github.com:Meituan-Dianping/DBProxy.git
编译源码并安装(添加新文件和修改版本的时候需要运行autogen.sh,注意docker centos:6.6 image下运行autogen.sh会失败)
sh autogen.sh
sh bootstrap.sh
make && make install

执行sh bootstrap.sh 报错

修改 bootstrap.sh 成下面这个样子
#!/bin/sh 
base=$(cd "$(dirname "$0")"; pwd)
cd $base
./configure  --with-mysql=/usr/local/mysql/bin/mysql_config --prefix=/usr/local/mysql-proxy CFLAGS="-s -O0" CPPFLAGS="-I/usr/local/mysql/include/" LDFLAGS="-lm -ldl -lcrypto -ljemalloc" LUA_CFLAGS="-I/usr/include/" LUA_LIBS="-L/usr/lib64 -llua"

执行 make && make install的时候报错
network-mysqld-packet.c: In function 'network_mysqld_auth_challenge_new':
network-mysqld-packet.c:1470:9: error: 'CLIENT_SECURE_CONNECTION' undeclared (first use in this function)
        CLIENT_SECURE_CONNECTION |
        ^
network-mysqld-packet.c:1470:9: note: each undeclared identifier is reported only once for each function it appears in
network-mysqld-packet.c: In function 'network_mysqld_proto_get_auth_challenge':
network-mysqld-packet.c:1583:31: error: 'CLIENT_SECURE_CONNECTION' undeclared (first use in this function)
    if (shake->capabilities & CLIENT_SECURE_CONNECTION) {
                              ^
network-mysqld-packet.c: In function 'network_mysqld_auth_response_new':
network-mysqld-packet.c:1695:26: error: 'CLIENT_SECURE_CONNECTION' undeclared (first use in this function)
    auth->capabilities = CLIENT_SECURE_CONNECTION | CLIENT_PROTOCOL_41;
                          ^
network-mysqld-packet.c: In function 'network_mysqld_proto_get_auth_response':
network-mysqld-packet.c:1772:34: error: 'CLIENT_SECURE_CONNECTION' undeclared (first use in this function)
        if (auth->capabilities & CLIENT_SECURE_CONNECTION) {

http://blog.51cto.com/hnr520/1887750
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值