电脑死机重启后,再开机打开xampp
,mysql
就无法启动了。
xampp上的错误日志
09:41:15 [mysql] Error: MySQL shutdown unexpectedly.
09:41:15 [mysql] This may be due to a blocked port, missing dependencies,
09:41:15 [mysql] improper privileges, a crash, or a shutdown by another method.
09:41:15 [mysql] Press the Logs button to view error logs and check
09:41:15 [mysql] the Windows Event Viewer for more clues
09:41:15 [mysql] If you need more help, copy and post this
09:41:15 [mysql] entire log window on the forums
Bash
大概意思是mysql启动失败,提示可能是端口被占用,缺少依赖,权限问题,电脑死机或者其他任何导致关机都可能是原因,等于啥都没说,端口确认是没有占用的,我这个情况显然是因为之前的电脑死机导致的。
提示查看错误日志。下面查看mysql的启动错误日志。
mysql启动日志
2020-10-22 9:19:09 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2020-10-22 9:19:09 0 [Note] InnoDB: Uses event mutexes
2020-10-22 9:19:09 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-10-22 9:19:09 0 [Note] InnoDB: Number of pools: 1
2020-10-22 9:19:09 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-10-22 9:19:09 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2020-10-22 9:19:09 0 [Note] InnoDB: Completed initialization of buffer pool
2020-10-22 9:19:10 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-10-22 9:19:10 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-10-22 9:19:10 0 [Note] InnoDB: Setting file 'D:\xampp72\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-10-22 9:19:10 0 [Note] InnoDB: File 'D:\xampp72\mysql\data\ibtmp1' size is now 12 MB.
2020-10-22 9:19:10 0 [Note] InnoDB: Waiting for purge to start
2020-10-22 9:19:10 0 [Note] InnoDB: 10.4.11 started; log sequence number 18007704893; transaction id 1827990
2020-10-22 9:19:10 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-10-22 9:19:10 0 [Note] InnoDB: Loading buffer pool(s) from D:\xampp72\mysql\data\ib_buffer_pool
2020-10-22 9:19:10 0 [Note] Server socket created on IP: '::'.
Bash
从这上面看不出来到底哪里报错了,没有什么大问题。
进入到xampp
下的mysql
的bin
文件夹,我这边是D:\xampp72\mysql\bin
运行mysqld --console
。
我在Windows 7 32位上安装Xampp。当我尝试在XAMPP控制面板(v3.2.1)中启动MySql时,我有以下消息,MySql不启动。
23:02:03 [mysql] Problem detected! 23:02:03 [mysql] Port 3306 in use by ""C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld" --defaults-file="C:\Program Files\MySQL\MySQL Server 5.1\my.ini" MySQL"! 23:02:03 [mysql] MySQL WILL NOT start without the configured ports free! 23:02:03 [mysql] You need to uninstall/disable/reconfigure the blocking application 23:02:03 [mysql] or reconfigure MySQL and the Control Panel to listen on a different port 23:02:03 [mysql] Attempting to start MySQL service...
一个类似的问题报告here,但没有工作的答案。当我试图安装与MySql禁用,结果是,我甚至没有一个选项,甚至尝试运行它。
我是新到Xampp,不知道在哪里和寻找什么来解决这个问题
我需要运行Apache和MySql与Php。
mysql启动解决方案
您已经在此机器上安装了一个使用端口3306的mySQL版本。进入最新的my.ini文件,将端口更改为3307.重新启动mySQL服务,看看是否出现。