- 浏览: 242124 次
文章分类
最新评论
mysql auto-rehash:读取表信息和列信息,可以在连上终端后开启tab补齐功能。
不启用auto-rehash功能,可以在mysql -h 连接时指定-A选项。
若mysql的默认连接没有设置auto-rehash,也可以在 mysql连接数据库时使用 --auto-rehash来设定使用此选项,开启tab补齐功能。
这几天才知道MySQL 命令(command)自动补齐功能 (用了好几年MySQL,现在才知道,真是惭愧呀)
但是默认不是开启的。若要开启此功能,可以在Linux中
vi /etc/my.cnf
[mysql]
#no-auto-rehash
auto-rehash #添加auto-rehash
即将[mysql]中的no-auto-rehash改为auto-rehash
再次登陆MySQL就可以自动补全了。
如果你想尝试在Windows中做同样尝试,会发现不会成功。
原因在下面的英文中有解释:
It ought to work this way:
C:\> mysql --auto-rehash
Or configure your my.cnf:
[mysql]
auto-rehash
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 2004 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 :-)
不启用auto-rehash功能,可以在mysql -h 连接时指定-A选项。
若mysql的默认连接没有设置auto-rehash,也可以在 mysql连接数据库时使用 --auto-rehash来设定使用此选项,开启tab补齐功能。
这几天才知道MySQL 命令(command)自动补齐功能 (用了好几年MySQL,现在才知道,真是惭愧呀)
但是默认不是开启的。若要开启此功能,可以在Linux中
vi /etc/my.cnf
[mysql]
#no-auto-rehash
auto-rehash #添加auto-rehash
即将[mysql]中的no-auto-rehash改为auto-rehash
再次登陆MySQL就可以自动补全了。
如果你想尝试在Windows中做同样尝试,会发现不会成功。
原因在下面的英文中有解释:
It ought to work this way:
C:\> mysql --auto-rehash
Or configure your my.cnf:
[mysql]
auto-rehash
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 2004 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 :-)
发表评论
-
RAID write back write through
2014-07-09 13:44 933RAID write back指的是raid控制器能够将写 ... -
druid PreparedStatementCache设置
2014-07-08 14:34 3595druid的连接池配置中有PreparedStatement ... -
innodb 插入缓冲
2014-07-01 16:07 691插入缓冲是InnoDB存储引 ... -
Innodb配置,将数据与日志放在不同磁盘可以加快性能
2012-12-06 19:23 737An advanced my.cnf example ... -
character_set_client character_set_connection character_set_results
2012-11-19 20:21 3232之前一直纠结各种编码的却别:character_set_c ... -
amoeba-mysql的安装使用和读写分离(转)
2012-11-16 16:11 1021http://blog.csdn.net/chen861201 ... -
mysqlcheck myisamchk
2012-11-07 17:45 748mysqlcheck的功能类似myisamchk,但其工作不同 ... -
mysqlbinlog乱码
2012-11-06 19:49 5386使用mysqlbinlog查看二进制文件发现 /*!40019 ... -
MySQL主从复制(Master-Slave)与读写分离(MySQL-Proxy)实践
2012-09-19 20:21 768MySQL主从复制(Master-Slave)与读写分离(My ... -
mysql显示见表语句
2012-09-03 19:13 1168show create table mysql.slow_l ... -
mysql主从同步延迟问题
2012-08-30 14:18 847见http://www.ixpub.net/thread-13 ... -
二进制日志文件
2012-08-29 19:33 1107mysqld在每个二进制日志 ... -
备份恢复数据库
2012-08-28 20:18 823全备份 mysqldump -utest -ptest -- ... -
mysql用户修改密码
2012-08-28 19:37 760mysqladmin -utest -ptest passwo ... -
set session sql_log_bin=0
2012-08-21 15:22 3965引自http://blog.sina.com.cn/s/blo ... -
字符串转换成date
2012-08-15 20:00 912SELECT STR_TO_DATE('Tue 05 June ... -
selecting top N records per group
2012-08-15 18:56 901http://code.openark.org/blog/my ... -
MySQL DELAY_KEY_WRITE
2012-08-02 20:03 1131MySQL DELAY_KEY_WRITE 引自http:// ... -
Mysql Merge表的优点
2012-07-09 13:52 936在Mysql数据库中,Mysql Me ... -
MySQL线程共享内存参数
2012-07-03 16:48 877MySQL线程共享内存参数 引用 http://mxohy. ...
相关推荐
laravel-needs-auto-hash ... ...composer require samasend/laravel-needs-auto-rehash 基本用法 就是这样,您只需要安装软件包即可。 :rocket: 这是如何运作的? 这个神奇的程序包侦听的内置Illumi
no-auto-rehash prompt="\u@\h [\d]>" #pager="less -i -n -S" #tee=/opt/mysql/query.log [mysqld] user = mysql basedir = /usr/local/mysql datadir = /data/mysql/mysql3306/data port = 3306 socket = /tmp/...
本文实例讲述了MySQL数据库基础入门之常用命令。分享给大家供大家参考,具体如下: 接上一篇:MySQL数据库...--auto-rehash #自动补全功能 -A, --no-auto-rehash #不需自动补全 -B, --batch #不使用历史文件,禁用
项目-ReHash 仅测试 测试 2
no-auto-rehash default-character-set=utf8 /etc/mysql/mysql.conf.d/mysqld.cnf 在[mysqld]下加入 socket = /var/run/mysqld/mysqld.sock port = 3306 character-set-server=utf8 (这里是server,之前有的版
此配置是老男孩生产线上使用的配置,在培训的时候,他给的,我在这里,对各参数添加了...no-auto-rehash [mysqld] user = mysql port = 3306 socket = /data/3306/mysql.sock basedir = /usr/local/mysql datadir = /d
资源来自pypi官网。 资源全名:rehash-0.2.0-py2.py3-none-any.whl
npm i -D rehash-webpack-plugin yarn add --dev rehash-webpack-plugin 然后,您可以使用其 md5 值轻松重命名发出的 JS/CSS 文件。 用法 该插件将根据最终 webpack 发出的资产内容计算哈希值,替换 JS/CSS ...
rehash_js-源码.rar
基于Redis Cluster打造的缓存系统。...本文尝试分享在运维过程中踩过的Redis Rehash机制的一些坑以及我们的解决方案,其中在高负载情况下物理机发生丢包的现象和解决方案已经写成博客。感兴趣的同学可以参考:
对HashMap扩容时重新计算旧数组元素在新数组地址的rehash方法中的(e.hash&oldCap)==0算法推导
rehash.js rehash.js 是一个 URL 片段操作库。 rehash.js 添加的主要功能是能够以类似于标准 URL GET 参数的样式拆分 URL 中的参数。 例如: http://amussey.com/#home&filter=projects此 URL 将分解为包含以下信息...
仅检查扩展名 .avi、.mkv、.mp4 -Rehash:使用 ed2k 散列文件并检查完整性 -打开文件夹:在资源管理器中打开文件 -查看/隐藏不可用的文件:如果您有外部硬盘并且您扫描文件它,您可以选择在硬盘断开连接时隐藏这些...
哈希值的计算,主要有md4和md5,crc16和crc32,sha1和sha2等
Squirrel(松鼠)是美团技术团队基于RedisCluster打造的缓存系统。经过不断的迭代研发,目前已形成一整套自动化运维体系:涵盖一键运维集群、细粒度的监控、支持自动扩缩容以及热点Key监控等完整的解决方案。...
各种加密算法,包括MD5,CRC,Sha
使用 vagrant 的 Rails 4.1、Ruby 2.0、nginx 和 passanger 存储库 先决条件 流浪汉 虚拟盒子 如果您是 Windows 用户,请下载并安装 [Git for windows] ( ) ... rbenv rehash bundle install --no-deployment; bun
各种hash算法md2、md4、md5、sha1、crc等
重新散列 为Hacker News进行重新哈希处理Hacker News的Android客户端 二进制: SDK版本:23 最低SDK版本:9