sql2000有自动补全命令的功能吗?有的话怎样操作?默认不是开启的 。若要开启此功能 , 可以在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 :-)
mysql不支持补全默认情况下是打开自动补全,可以'补全数据库'、'表'和'字段'的名称--'补全有限'
用–disable-auto-rehash关闭自动补全,这样会使MySQL启动更快,但是必须用rehash或者自己的\#来实现自动补全 。
为了完成补全 , '输入一部分并按Tab来补全',但如果匹配的不止一个可以再按Tab来展开所有的可能,但如果没有匹配的就不会补全 。
临时补全
mysql -u root -p -A --auto-rehash
三第三方的自动补全
MyCLI :一个支持自动补全和语法高亮的
mysql杂谈(一)自动补全
有谁知道怎么可以让Mysql Workbench的查询窗口中的输入命令自动补全么?PL/SQL有自动提示mysql怎么设置补全键,例如输入crea mysql怎么设置补全键的时候mysql怎么设置补全键 , 会出现一个下拉单 create 但是没有自动补全的方法哦~~会提示,没补全 新建一个SEQmysql怎么设置补全键: create sequence seq_
linux mysql 自动补全1、my.cnf添加
【mysql怎么设置补全键 mysql 补0】[mysql]
auto-rehash
2、或者用mysql -u root -p --auto-rehash
3、example
mysql us[TAB] my[TAB]
mysql select user.[TAB] from user;
在MySQL中如何设置主键和外键工具/原料
电脑MySQL
方法/步骤
设置主键:
1、通过终端进入到mysql命令行工具 。
2、通过use关键字进行到目标数据库里 。
3、如原表已有主键mysql怎么设置补全键 , 先把原来mysql怎么设置补全键的主键删除掉mysql怎么设置补全键,通过DROPPRIMARYKEY命令:ALTERTABLE`jingyan`DROPPRIMARYKEY; 。
4、主键已经没有mysql怎么设置补全键了 。
5、通过命令:ADDPRIMARYKEY来添加ALTERTABLE`jingyan`ADDPRIMARYKEY(`id`) 。
6、输入后按下回车键即可看到queryok执行成功的字符 。
7、回到数据库的可视化工具,即可显示现在的表在id列上添加mysql怎么设置补全键了主键了 。
设置外键:
1、创建好主从表 。
2、选择主表,点击设计表,进入到表设计界面 。
3、点击外键 , 进入到外键设置界面 。
4、先设置外键名称和选择主表的外键字段 。
5、然后在设置外键字段对应从表的数据库、表名和字 。
6、点击保存就完成外键设置了 。
MYSQL:如何使用MYSQL命令行的自动补全功能使用MYSQL -I命令,查看MYSQL命令的参数,其中对--auto-rehash参数的说明如下:--auto-rehash Enable automatic rehashing. One doesn#39;t need to use #39;rehash#39; to get table and field completion, but startup and reconnecting may take a longer time. Disable with --disable-auto-rehash. 网上也找了一些资料 , 说是打开MYSQL的自动补全功能,类似于LINUX的TAB键补全功能 。但如下使用该参数后,输入SQL命令 , 中途按TAB健,并未出现自动补全的效果,不知道如何操作: [sql] C:\Users\qxlmysql -u root --auto-rehash Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 29 Server version: 5.1.28-rc-community MySQL Community Server (GPL) Type #39;help;#39; or #39;\h#39; for help. Type #39;\c#39; to clear the buffer. mysql use test Database changed mysql select * from newnam
mysql怎么设置补全键的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于mysql 补0、mysql怎么设置补全键的信息别忘了在本站进行查找喔 。
推荐阅读
- 个人店铺公众号运营,店铺微信公众号运营
- 宜春亚马逊电商如何做,亚马逊电商入门教程
- 游戏开发猎头,游戏行业猎头的发展前景
- vb.net封装教程 vbnet single
- mysql双机热备原理 mysql双机热备方案比较
- 电视会员属于什么服务范围,电视会员是什么
- 营销副总如何抓营销人员,营销副总如何抓营销人员工作
- php调用后台返回数据 php获取接口返回值
- 餐饮店如何做才能营销,餐饮店如何做营销策划方案