Windows下在MySQL中自动完成 [英] Autocomplete in MySQL under Windows

查看:184
本文介绍了Windows下在MySQL中自动完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道在Windows下的MySQL Command Line Client中是否有办法使自动完成工作吗?对我来说,它在Linux下可以很好地工作,但是只需将光标移到Windows下即可.

Does anybody know if there is a way to make autocompletion work in MySQL Command Line Client under Windows? It's working nicely under Linux for me, but simply moves the cursor under Windows instead.

推荐答案

它应该这样工作:

C:\> mysql --auto-rehash

或配置您的my.cnf:

Or configure your my.cnf:

[mysql]
auto-rehash

编辑:很抱歉.我发现一些参考资料表明,mysql客户端中的制表符完成功能仅在UNIX/Linux上有效.在Windows上不起作用.

edit: My apologies. I have found some references that the tab-completion feature in mysql client works only on UNIX/Linux. It does not work on Windows.

更新:在MySQL 错误#4731 :

[2004年7月31日12:47] Sergei Golubchik

[31 Jul 2004 12:47] Sergei Golubchik

我刚刚下载了4.0.15-命令 mysql.exe中的完成不是 按预期工作.从来没有 在mysql.exe中工作,因为我们 无法使readline编译 使用VC ++.

I just downloaded 4.0.15 - command completion in mysql.exe is NOT working, as expected. It was never working in mysql.exe because we were not able to make readline to compile with VC++.

mysqlc.exe是cygwin的内部版本,它与readline链接.

mysqlc.exe is a cygwin build, and it is linked with readline.

说明: GNU readline 是用于处理用户输入的标准开源库. MySQL团队使用readline库,但他们不是它的作者.从上面的评论中,我了解到他们在使用Microsoft Visual C ++编译Windows上的readline库方面没有成功,Microsoft Visual C ++是他们用来构建MySQL产品的工具.某些开源项目尚未完全与Microsoft Windows环境兼容.

Explanation: GNU readline is a standard open-source library for handling user input. The MySQL team uses the readline library, but they are not its author. From the above comment, I understand that they were unsuccessful in compiling the readline library on Windows with Microsoft Visual C++, the tool they use to build the MySQL product. Some open-source projects have not been made fully compatible with the Microsoft Windows environment.

过去,MySQL产品曾经提供了一个名为mysqlc.exe的替代客户端,并使用 Windows上的cygwin 工具集,但它们不再提供此功能. cygwin工具集包含readline库,因此可以编译支持制表符补全的mysqlc.exe客户端.

At one time in the past, the MySQL product provided an alternative client they called mysqlc.exe, which they compiled with the cygwin toolset on Windows, but they don't provide this anymore. The cygwin toolset includes the readline library, so it was possible to compile the mysqlc.exe client with support for tab-completion.

因此,从理论上讲,如果您真的很勇敢,则可以下载包括readline库的cygwin工具集,然后下载MySQL源代码并使用cygwin进行构建.然后,您应该有一个可以执行制表符补全的mysql客户端程序.但是,即使对于熟悉从源代码构建MySQL的人来说,这听起来也需要大量工作.

So in theory, if you are really intrepid, you could download the cygwin toolset including the readline library, then download the MySQL source code and build it using cygwin. Then you should have a mysql client program that can perform tab-completion. But this sounds like a lot of work even for someone who is familiar with building MySQL from source.

这篇关于Windows下在MySQL中自动完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆