Home  >  Article  >  Database  >  解决MYSQL访问时无法切换数据库的问题.Reading table informatio

解决MYSQL访问时无法切换数据库的问题.Reading table informatio

WBOY
WBOYOriginal
2016-06-07 15:39:421062browse

今天访问数据库的时候出现: mysql use mydb Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A 一般产生这个问题是由于MYSQL中数据库太大,导致读取预读时间太长,从而显

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

mysql> use mydb

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 informatio

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


mysql> kill 16545618;

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


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn