失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > MySQL 命令的自动补全功能

MySQL 命令的自动补全功能

时间:2021-02-25 01:20:30

相关推荐

MySQL 命令的自动补全功能

数据库|mysql教程

MySQL教程,MySQL 命令的自动补全功能,数据库,Or

数据库-mysql教程

派派源码下载,vscode代码折叠打开,远程 ubuntu 跳出,tomcat加载软件,sqlite3 修改库名,爬虫爬不到我的网站内容,php数据库图片路径,商丘seo优化排名报价,开源b2c网站商城,网页多条件查询模板lzw

这几天才知道MySQL 命令(command)自动补齐功能 (用了好几年MySQL,现在才知道,真是惭愧呀)但是默认不是开启的。若要开启此功

微信第三方小店模板源码,ubuntu在终端执行,爬虫入门教学视频,php工程师工作经验多少钱,青莲seo博客lzw

邮件群发系统源码,vscode从零开发c,ubuntu 更新404,tomcat下载的配置,爬虫数据搜索,php post无参数,镇海seo推广按天计费,cms免费展示类网站模板下载,静态音乐网站模板lzw

这几天才知道MySQL 命令(command)自动补齐功能 (用了好几年MySQL,现在才知道,真是惭愧呀)

但是默认不是开启的。若要开启此功能,,可以在Linux中

vi /etc/f

[mysql]

#no-auto-rehash

auto-rehash #添加auto-rehash

即将[mysql]中的no-auto-rehash改为auto-rehash

再次登陆MySQL就可以自动补全了。

如果你想尝试在Windows中做同样尝试,会发现不会成功。

原因在下面的英文中有解释:

It ought to work this way:

Or configure your f:

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.

update: The reason for this is mentioned briefly in MySQL bug #4731:

[31 Jul 12:47] Sergei Golubchik

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 is a cygwin build, and it is linked with readline.

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.

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.

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.

这是MySQL Windows版本的一个Bug ????

如果觉得《MySQL 命令的自动补全功能》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。