【XAMPP】启动数据库Error: MySQL shutdown unexpectedly.

问题:

启动MySQL时报错如下:
Error: MySQL shutdown unexpectedly.
This may be due to a blocked port, missing dependencies,
improper privileges, a crash, or a shutdown by another method.
Press the Logs button to view error logs and check
the Windows Event Viewer for more clues
If you need more help, copy and post this
entire log window on the forums
【XAMPP】启动数据库Error: MySQL shutdown unexpectedly._第1张图片

解决方法:

  1. 打开注册表编辑器
  2. 导航到:计算机\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MySQL
  3. 双击 ImagePath ,将数值数据修改为xampp下mysql下bin下文件的地址,例如:d:\xampp\mysql\bin\mysqld.exe --defaults-file=d:\xampp\mysql\bin\my.ini mysql

【XAMPP】启动数据库Error: MySQL shutdown unexpectedly._第2张图片
【XAMPP】启动数据库Error: MySQL shutdown unexpectedly._第3张图片

  1. 设置完毕后,点击Start,启动成功
    【XAMPP】启动数据库Error: MySQL shutdown unexpectedly._第4张图片

你可能感兴趣的:(xampp,数据库,mysql)