本文介绍了CryptDB-无法连接到代理(错误1105(HY000):(代理)所有后端均关闭)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Ubuntu 14.04中安装了CryptDB.我要启动代理:

I install CryptDB in Ubuntu 14.04. I want to start the proxy:

$ /home/user/cryptdb/bins/proxy-bin/bin/mysql-proxy \
    --plugins=proxy \
    --event-threads=4 \
    --max-open-files=1024 \
    --proxy-lua-script=$EDBDIR/mysqlproxy/wrapper.lua \
    --proxy-address=127.0.0.1:3307 \
    --proxy-backend-addresses=localhost:3306

它开始了:

2015-10-26 00:04:34: [global] (*) mysql-proxy 0.9.0 started

然后我使用以下命令登录mysql:

Then I login mysql use this command:

$ mysql -u root -pletmein -h 127.0.0.1 -P 3307

它显示:

代理输出:

我将MySQL和CryptDB安装在同一台VM上.

I install MySQL and CryptDB on the same VM.

我正在按照 CryptDB自述文件在GitHub上.

I am following the steps on CryptDB readme on GitHub.

以下问题已解决,以上问题尚未解决.

the problem below is fixed, the above problem not fix yet.

此外,原始脚本(cryptdb/mysqlproxy/wrapper.lua)也会导致错误:

Also, the original script (cryptdb/mysqlproxy/wrapper.lua) cause an error:

[字符串"/home/user/cryptdb/mysqlproxy/wrapper.lua"]:1:尝试串联nil值

[string "/home/user/cryptdb/mysqlproxy/wrapper.lua"]:1: attempt to concatenate a nil value

似乎os.getenv("EDBDIR")返回nil,即使我在~/.bashrc中设置了EDBDIR:EDBDIR=/home/user/cryptdb.

Seems the os.getenv("EDBDIR") return nil even I have set the EDBDIR in ~/.bashrc: EDBDIR=/home/user/cryptdb.

所以我只是这样修改代码,希望这不会引起其他问题:

So I just modify the code like this, hope this won't cause another problem:

-- assert(package.loadlib(os.getenv("EDBDIR").."/obj/libexecute.so",
assert(package.loadlib("/home/user/cryptdb/obj/libexecute.so",
                   "lua_cryptdb_init"))()

推荐答案

对于第一个问题,请使用以下命令启动代理:

For your first problem, start the proxy with:

$ /home/user/cryptdb/bins/proxy-bin/bin/mysql-proxy \
--plugins=proxy \
--event-threads=4 \
--max-open-files=1024 \
--proxy-lua-script=$EDBDIR/mysqlproxy/wrapper.lua \
--proxy-address=127.0.0.1:3307 \
--proxy-backend-addresses=127.0.0.1:3306

请注意使用 127.0.0.1 代替 localhost .

对于第二个问题,请按照上述建议在.bashrc中添加export EDBDIR=/home/user/cryptdb.

For your second problem, add export EDBDIR=/home/user/cryptdb to your .bashrc as suggested above.

这篇关于CryptDB-无法连接到代理(错误1105(HY000):(代理)所有后端均关闭)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!