mysql Enable automatic rehashing方式登陆hang问题
来源:互联网 发布:mac utorrent 没速度 编辑:程序博客网 时间:2024/06/04 08:22
登陆myql数据库的crmdb schema一直hang:
# mysql -uroot -proot_beehive -Dcrmdb
Warning: Using a password on the command line interface can be insecure.
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
查询进程:
# mysql -uroot -proot_beehive
.......
mysql> show processlist;
+------+------+---------------------+--------------------+------------+------+---------------------------------+------------------------------------------------------------------------------------------------------+-----------+---------------+
| Id | User | Host | db | Command | Time | State | Info | Rows_sent | Rows_examined |
+------+------+---------------------+--------------------+------------+------+---------------------------------+------------------------------------------------------------------------------------------------------+-----------+---------------+
| 8073 | root | localhost | crmdb | Query | 4284 | Sending data | create table offer_2_party_bk2 as select a.offer_id,a.atom_action_id,a.party_id,a.start_dt,a.end_dt, | 0 | 0 |
| 8075 | root | localhost | mysql | Sleep | 487 | | NULL | 0 | 0 |
| 8079 | root | localhost | crmdb | Field List | 2775 | Waiting for table metadata lock | | 0 | 0 |
| 8082 | crm | 132.228.47.137:3947 | information_schema | Sleep | 1698 | | NULL | 0 | 0 |
| 8084 | root | localhost | crmdb | Field List | 274 | Waiting for table metadata lock | | 0 | 0 |
| 8085 | root | localhost | NULL | Query | 0 | init | show processlist | 0 | 0 |
+------+------+---------------------+--------------------+------------+------+---------------------------------+------------------------------------------------------------------------------------------------------+-----------+---------------+
看到一个元数据锁等待,执行一个field list的命令。
在上面hang之前提示使用-A 选项登陆mysql:
[root@bssmysqlcsdb02 ~]# mysql --help
mysql Ver 14.14 Distrib 5.6.19-67.0, for Linux (x86_64) using EditLine wrapper
Copyright (c) 2009-2014 Percona LLC and/or its affiliates
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Usage: mysql [OPTIONS] [database]
-?, --help Display this help and exit.
-I, --help Synonym for -?
--auto-rehash Enable automatic rehashing. One doesn't need to use
'rehash' to get table and field completion, but startup
and reconnecting may take a longer time. Disable with
--disable-auto-rehash.
(Defaults to on; use --skip-auto-rehash to disable.)
-A, --no-auto-rehash
No automatic rehashing. One has to use 'rehash' to get
table and field completion. This gives a quicker start of
mysql and disables rehashing on reconnect.
automatic rehashing实际上相当于tab键的提示,默认情况下,加-Dcrmdb会加载元数据,提供tab提示:
# mysql -uroot -proot_beehive -Dcrmdb --auto-rehash
......
mysql> select offer_ --按tab键
-------------------------------------------------------------提示
offer_id offer_member.bill_start_dt offer_member.end_dt offer_member.offer_member_id offer_member.status_dt
offer_member offer_member.bss_end_dt offer_member.member_id offer_member.offer_role_id offer_member.version
offer_member.atom_action_id offer_member.bss_start_dt offer_member.obj_type offer_member.start_dt offer_member_id
offer_member.bill_end_dt offer_member.create_dt offer_member.offer_id offer_member.status_cd offer_role_id
这就是所谓的automatic rehashing
- mysql Enable automatic rehashing方式登陆hang问题
- Rehashing
- Rehashing
- mysql连接hang住问题分析
- mysql use mysql hang
- MySQL所有操作hang住问题的故障排查
- Enable/Disable outlook 2013 automatic number
- MySQL登陆问题总结
- mysql登陆问题
- mysql无法登陆问题
- mysql登陆初次问题
- mysql登陆测试hydra方式
- Hang Detect 问题
- MySQL登陆方式、数据类型、数据引擎及SQL查询语句,注意的问题.
- [刷题]Rehashing
- #129 Rehashing
- Mac下mysql登陆问题
- 再论mysql线程出现Waiting for table flush被hang住问题
- 学ios需要了解的C语言基础知识-4-进制
- Activity四种LaunchMode详解
- android Bitmap getByteCount和getRowBytes
- 百度发布站长白皮书 用户体验才是王道
- Android 开源框架Universal-Image-Loader完全解析(二)--- 图片缓存策略详解
- mysql Enable automatic rehashing方式登陆hang问题
- C++插入排序
- PHP文件上传
- CString的GetBuffer ReleaseBuffer
- STL array的empty方法(10)
- LeetCode: Clone Graph
- 解决win8 已禁用IME
- Linux之参考资料
- 关于JSP中的i++和++i和i+1和getParameterValues类型转换和for中的遍历问题