MySQL Reading table information for completion of table and column names

打开数据库是发现提示:

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| backup_operation |
| information_schema |
| operation |
+--------------------+
3 rows in set (0.09 sec) mysql> use operation;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A Database changed

加载表和列名称完成的表信息

您可以关闭此功能,以获得更快的启动使用option:-A

说白了就是在登陆数据库是加一个-A的option,不预读数据库的信息就ok了,

下边是网上查到的原因:

出现问题的原因是::
我们进入mysql 时,没有使用-A参数;
即我们使用
mysql -hhostname -uusername -ppassword -Pport 的方式进入数据,
而没有使用
mysql -hhostname -uusername -ppassword -Pport -A的方式进入数据库。 当我们打开数据库,即use dbname时,要预读数据库信息,当使用-A参数时,就不预读数据库信息。 关键的因素是你的数据库变大了。系统变慢了

还有一种情况是:

今天访问数据库的时候出现:

Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

一般产生这个问题是由于MYSQL中数据库太大,导致读取预读时间太长,从而显示这个提示,如果之前都没有遇到这个问题,那么产生这个问题的原因可能是由于有改变数据库信息的操作,比如drop一个很大的表(几千万数据)而中途终止.

先查看当前的进程情况,:

mysql> show processlist ;

MySQL Reading table information for completion of table and column names

上图中锁表的id为16545618,则可以使用kill命令,结束它.

mysql> kill 16545618;

删除这些锁表的情况,我的mysql就能正常访问了.

以上资料来源于博客:

https://www.linuxidc.com/Linux/2014-04/99419.htm

https://www.cnblogs.com/wajika/p/6773020.html

上一篇:msyql error: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A


下一篇:Reading table information for completion of table and column names