mysql切換資料庫提示警告:Reading table information for completion of table and column names

來源:互聯網
上載者:User

標籤:man   inf   沒有   stat   server   current   oracle   src   gis   

    登入資料庫後,選擇資料庫時發現以下提示,

mysql> use test
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
mysql>

    意思是 預讀這個庫中表以及表列資訊,一般原因是當庫中表很多,表中資料很大時,就會出現執行use <庫名>後半天沒反應,串連很慢的情況,解決辦法就是 -A 方式登入資料庫,不會預讀庫中表資訊。

shell> mysql -h hostname -u username -P port -p -A

Enter password:

(eg:shell> mysql -h 127.0.0.1 -u root -P 3306 -p -A)

本機登入資料庫,直接執行-A也是可以的。

mysql> use test;
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
mysql> \q
Bye
[[email protected] ~]# mysql -u root -p -A
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 5.7.23 MySQL Community Server (GPL)

Copyright (c) 2000, 2018, 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.

Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.

mysql> use test
Database changed
mysql>

另一種情況,無法切換訪問資料庫,提示此資訊。(我沒遇到過,一併貼過來瞭解下)

由於MYSQL中資料庫太大,導致讀取預讀時間太長,從而顯示這個提示,如果之前都沒有遇到這個問題,那麼產生這個問題的原因可能是由於有改變資料庫資訊的操作,比如drop一個很大的表(幾千萬資料)而中途終止.

mysql> show processlist ;    (查看進程)

中鎖表的id為16545618,則可以使用kill命令,結束它.

mysql> kill 16545618;

刪除這些鎖表的情況,我的mysql就能正常訪問了。

 

mysql切換資料庫提示警告:Reading table information for completion of table and column names

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.