2016-11-27 97 views
0

當我啓動xampp時,它在mysql中給我一個錯誤。我使用Windows 10
下面是錯誤日誌的內容:在XAMPP中啓動MYSQL時出錯

2015-11-10 15:26:56 10fc InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator. 
2015-11-10 15:26:56 4348 [Note] InnoDB: Using mutexes to ref count buffer pool pages 
2015-11-10 15:26:56 4348 [Note] InnoDB: The InnoDB memory heap is disabled 
2015-11-10 15:26:56 4348 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 
2015-11-10 15:26:56 4348 [Note] InnoDB: Memory barrier is not used 
2015-11-10 15:26:56 4348 [Note] InnoDB: Compressed tables use zlib 1.2.3 
2015-11-10 15:26:56 4348 [Note] InnoDB: Not using CPU crc32 instructions 
2015-11-10 15:26:56 4348 [Note] InnoDB: Initializing buffer pool, size = 16.0M 
2015-11-10 15:26:56 4348 [Note] InnoDB: Completed initialization of buffer pool 
2015-11-10 15:26:56 4348 [Note] InnoDB: Highest supported file format is Barracuda. 
2015-11-10 15:26:57 4348 [Note] InnoDB: 128 rollback segment(s) are active. 
2015-11-10 15:26:57 4348 [Note] InnoDB: Waiting for purge to start 
2015-11-10 15:26:57 4348 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.26-74.0 started; log sequence number 1835027 
2015-11-10 15:26:57 6140 [Note] InnoDB: Dumping buffer pool(s) not yet started 
2015-11-10 15:26:57 4348 [Note] Plugin 'FEEDBACK' is disabled. 
2015-11-10 15:26:57 4348 [Note] Server socket created on IP: '::'. 
2015-11-10 15:26:57 4348 [Note] Event Scheduler: Loaded 0 events 
2015-11-10 15:26:57 4348 [Note] C:\xampp\mysql\bin\mysqld.exe: ready for connections. 
Version: '10.1.8-MariaDB' socket: '' port: 3306 mariadb.org binary distribution 
2015-11-10 15:27:11 5152 [Note] C:\xampp\mysql\bin\mysqld.exe: Normal shutdown 

當我打開XAMPP並點擊啓動MySQL按鈕,它給我一個錯誤。

9:12:53 PM [mysql]  Error: MySQL shutdown unexpectedly. 
9:12:53 PM [mysql]  This may be due to a blocked port, missing dependencies, 
9:12:53 PM [mysql]  improper privileges, a crash, or a shutdown by another method. 
9:12:53 PM [mysql]  Press the Logs button to view error logs and check 
9:12:53 PM [mysql]  the Windows Event Viewer for more clues 
9:12:53 PM [mysql]  If you need more help, copy and post this 
9:12:53 PM [mysql]  entire log window on the forums 

UPDATE

下面是截圖: enter image description here

回答

0

可能是你3306或任何你使用正在使用其他應用程序。也許你不知道XAMPP通常在Skype等應用程序中遇到問題。如果您正在運行Skype,請嘗試關閉它並打開XAMPP。您也可以更改HTTP和MySQL的默認端口。

編輯Apache端口打開apache.conf並重新啓動服務器。

編輯MySql端口打開my.cnf並重新啓動服務。

你也可以看看這篇文章。可能是因爲損壞需要刪除數據庫文件,但如果您剛剛安裝了新的Xampp實例,則可能不是原因。

XAMPP - MySQL shutdown unexpectedly

UPDATE

這裏有一個如何,如果你喜歡改變的Skype端口一個很好的屏幕截圖。

https://stackoverflow.com/a/16351807/3518053

+0

我試圖從任務管理器運行停止使用Skype。但仍然有錯誤。 – Philip

+0

我也嘗試在config> my.ini中更改mysql中的端口爲3307,並全部替換3306 – Philip

+0

好的別擔心,有一個解決方案。嘗試檢查哪些端口被哪些應用程序阻止: http://www.howtogeek.com/howto/28609/how-can-i-tell-what-is-listening-on-a-tcpip-port-in- windows/ 您也可以嘗試從上面提供的linnk我inodb解鎖解決方案。 – manuelbcd

-1

記住要備份您的數據先!

使用CMD管理員卸載

  • XAMPP
  • 所有MySQL數據庫
  • mysql服務

然後使用SC刪除,並刪除所有目錄中刪除服務XAMPP。然後重新安裝。

0

問題是您的計算機中安裝了兩個mysql實例。檢查進程mysqld.exe是否已經通過任務管理器運行並終止它,如果存在。然後通過運行打開services.msc並刪除mysql的所有實例(在刪除之前終止它),重新啓動您的機器並再次運行XAMPP。這將解決您的問題。

0

請妥善謹慎地執行這些步驟。

  1. 此錯誤是由於已經安裝了MySQL(不同版本)的MySQL正在使用端口3306而引起的。

  2. 在XAMPP控制面板,你會發現「MySQL的幾個選項,如啓動,配置等是旁邊。

  3. 選擇配置並打開名爲'my.ini'的文件。它應該在記事本中打開。按Ctrl + F和查找'3306'並將其更改爲3308並保存該文件。 注意:您將找到3306個實例。將其全部更改爲3308.

  4. 現在打開位於Xampp控制面板右上角的配置。應該出現一個窗口。找到'服務和端口設置'。點擊按鈕,再次出現一個窗口。

5.On MySQL的標籤類型 '3308'。並保存更改。

6.在Windows搜索中搜索'services.msc'。應該彈出一個窗口。向下滾動,直到找到'MySQL'。

  1. 右鍵單擊MySQL並選擇「停止」。

  2. 現在以管理員身份運行命令提示符並鍵入以下命令。

SC刪除的MySQL

  • 這將成功地刪除以前安裝的MySQL。

  • 完全退出xampp控制面板並啓動一個新的新面板。

  • 現在你的MySQL應該啓動並運行了。