mysql自动完成名称_命令行 – rlwrap:mysql自动完成无法正常工...

通常,自动完成在mysql命令行客户端(mysql-client-5.5)中工作正常.我有一张叫做预订的桌子.当我键入字母b和pres TAB时,我的表名称会自动完成:

SELECT * FROM b

但是,当我使用rlwrap(别名mysql =’/usr/bin/rlwrap -s 99999 -a -pRED /usr/bin/mysql’)时,自动完成功能停止工作.

看起来好像rlwrap干扰了自动完成功能.

我正在使用Debian Wheezy.

更新1:

当我用strace开始我的命令时,即:

strace /usr/bin/rlwrap -s 99999 -a -pRED /usr/bin/mysql --auto-rehash

我看到以下错误

access("/usr/share/rlwrap/completions/mysql", R_OK) = -1 ENOENT (No such file or directory)

可能是,rlwrap需要一些带有mysql完成的文件吗?

更新2

好的,我已经创建了文件/usr/share / rlwrap / completions / mysql并在那里放了3个样本行:

select

from

where

现在,当我启动mysql并输入sele< TAB>时,该选项卡实际上完成了单词select.这是进步,但这并不能解决整个问题.我主要需要自动完成来帮助我完成我不想(想)记住的模糊表名.但是每次更改/添加/重命名表时,我都无法编辑自动完成文件.

是不是可以告诉rlwrap使用与mysql相同的自动完成文件? (我认为mysql必须使用一些这样的文件)

更新3:

以下是strace的其他错误

access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)

access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)

access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)

access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)

access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)

access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)

access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)

access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)

stat("/home/martin/.terminfo", 0x7fff27ee6a70) = -1 ENOENT (No such file or directory)

access("/etc/terminfo/x/xterm-256color", R_OK) = -1 ENOENT (No such file or directory)

access("/home/martin/.mysql_completions", R_OK) = -1 ENOENT (No such file or directory)

access("/usr/share/rlwrap/completions/mysql", R_OK) = -1 ENOENT (No such file or directory)

connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)

connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)

access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)

access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)

access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)

access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)

stat("/home/martin/.inputrc", 0x7fff27ee7710) = -1 ENOENT (No such file or directory)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值