標籤: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