最近在學習小程序,小程序的後臺cms系統須要安裝XAMPP軟件,這個軟件是個集成軟件,裏面有MySql 和 Apache 等 ,首先進入小程序後臺時須要啓動MySql 和 Apache mysql
Apache 直接就啓動了 MySql 卻一直啓動不了 開始的時候是由於我以前安裝過MySql ,因此路徑是不對的 ,解決這個問題最簡便的方式就是把以前的卸載了,再安裝XAMPP,sql
第二種方式就是 更改路徑:小程序
打開註冊表服務器
cmd app
regeditpost
找到學習
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MySQL] 中的ImagePath 修改爲你當前的mysqld的執行目錄this
相似:"D:\xampp\mysql\bin\mysqld"ci
從新啓動服務器成功!cmd
更改以後重啓仍是沒有成功 , MySql 重啓幾秒又關閉了,仍是不成功呢 報錯信息
22:59:43 [mysql] Attempting to start MySQL app... 22:59:43 [mysql] Status change detected: running 22:59:44 [mysql] Status change detected: stopped 22:59:44 [mysql] Error: MySQL shutdown unexpectedly. 22:59:44 [mysql] This may be due to a blocked port, missing dependencies, 22:59:44 [mysql] improper privileges, a crash, or a shutdown by another method. 22:59:44 [mysql] Press the Logs button to view error logs and check 22:59:44 [mysql] the Windows Event Viewer for more clues 22:59:44 [mysql] If you need more help, copy and post this 22:59:44 [mysql] entire log window on the forums
又經過各類查找 解決方法前提是先把Apache中止運行,第一步先在mysql文件裏面找到mysql_installservice.bat和mysql_uninstallservice.bat 兩個文件,先雙擊mysql_installservice.bat,而後關閉,再雙擊mysql_uninstallservice.bat 關閉,第二步把mysql>data>ibdata一、ib_logfile一、ib_logfile0 這幾個文件都刪除掉 ,而後重啓xampp,就能夠成功運行了。