MySQL訪問時無法切換資料庫的問題!

來源:互聯網
上載者:User

標籤:mysql訪問時無法切換資料庫的問題!

問題:

訪問資料查東西的時候,切換資料庫卡在一個地方,需要等好久。

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A

650) this.width=650;" src="http://s1.51cto.com/wyfs02/M00/82/7A/wKioL1dWeIWgeKZRAAA0AfIYM3Y127.jpg-wh_500x0-wm_3-wmp_4-s_1333232644.jpg" title="1.jpg" alt="wKioL1dWeIWgeKZRAAA0AfIYM3Y127.jpg-wh_50" />

瞭解:

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

show processlist ;(現在不存在鎖表情況)

650) this.width=650;" src="http://s5.51cto.com/wyfs02/M00/82/7A/wKioL1dWeQ6hvhHNAAE_4zryF2A402.jpg-wh_500x0-wm_3-wmp_4-s_2768503492.jpg" title="1.jpg" alt="wKioL1dWeQ6hvhHNAAE_4zryF2A402.jpg-wh_50" />

注意:如果出現有鎖表的情況,殺死即可。

kill  id;

然後重新使用資料庫,發現正常。


至於上述的-A參數,和預讀資料有關,加參數-A則不需要預讀資料庫資訊。

mysql -hhostname -uusername -ppassword -Pport -A

如果登陸之前沒有加-A切換資料庫

use mysql -A;

650) this.width=650;" src="http://s1.51cto.com/wyfs02/M01/82/7A/wKioL1dWeobQNbsEAAAU-EGLuMg474.jpg-wh_500x0-wm_3-wmp_4-s_2400601480.jpg" title="1.jpg" alt="wKioL1dWeobQNbsEAAAU-EGLuMg474.jpg-wh_50" />


小小經曆,調侃一下!

QQ:1145507435

郵箱:[email protected]

本文出自 “?唯一!” 部落格,請務必保留此出處http://renzhiyuan.blog.51cto.com/10433137/1786976

MySQL訪問時無法切換資料庫的問題!

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.