windows下如何重啟MySQL

來源:互聯網
上載者:User

標籤:mysql   windows   資料庫   


   windows下如何重啟MySQL?這有3種方法供大家參考

  一、MYSQL服務

  我的電腦——(右鍵)管理——服務與應用程式——服務——MYSQL——開啟(停止、重啟動)

  二、命令列方式

  Windows

  1.點擊“開始”->“運行”(快速鍵Win+R)。

  2.啟動:輸入 net stop mysql

  3.停止:輸入 net start mysql

  提示* Redhat Linux 也支援service command,啟動:# service mysqld start 停止:# service mysqld stop 重啟:# service mysqld restart

  * Windows下不能直接重啟(restart),只能先停止,再啟動。

  其實我們可以通過批處理完成 儲存為 mysqlreset.bat

代碼如下:

net stop mysql

  net start mysql

  三、Too many connections

  2008-04-30┆379,578 Views┆56,071

  錯誤編號:1040

  問題分析:

  串連數超過了 MySQL 設定的值,與 max_connections 和 wait_timeout 都有關係。wait_timeout 的值越大,串連的空閑等待就越長,這樣就會造成當前串連數越大。

  解決方案:

  1、虛擬機器主機使用者請聯絡空間商最佳化 MySQL 伺服器的配置;

  2、外掛式主控件使用者請聯絡伺服器管理員最佳化 MySQL 伺服器的配置,可參考:

  修改 MySQL 設定檔(Windows下為 my.ini, Linux下為 my.cnf )中的參數:

  CODE: [COPY]

  max_connections= 1000

  wait_timeout = 5

   以上內容由多備份www.dbfen.com總結所得 轉載請註明出處!

 


本文出自 “大丸子” 部落格,請務必保留此出處http://12478147.blog.51cto.com/9663367/1605829

windows下如何重啟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.