MySQL 会话不会在 XAMPP 上启动

Posted

技术标签:

【中文标题】MySQL 会话不会在 XAMPP 上启动【英文标题】:MySQL session won't start on XAMPP 【发布时间】:2020-06-17 17:13:32 【问题描述】:

我的 mysql 无法启动,它显示如下:

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

然后这是错误日志:

InnoDB: using atomic writes.
2020-03-05 12:50:47 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2020-03-05 12:50:47 0 [Note] InnoDB: Uses event mutexes
2020-03-05 12:50:47 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-03-05 12:50:47 0 [Note] InnoDB: Number of pools: 1
2020-03-05 12:50:47 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-03-05 12:50:47 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2020-03-05 12:50:47 0 [Note] InnoDB: Completed initialization of buffer pool
2020-03-05 12:50:48 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-03-05 12:50:48 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-03-05 12:50:48 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-03-05 12:50:48 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2020-03-05 12:50:48 0 [Note] InnoDB: Waiting for purge to start
2020-03-05 12:50:48 0 [Note] InnoDB: 10.4.11 started; log sequence number 300306; transaction id 171
2020-03-05 12:50:48 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2020-03-05 12:50:48 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-03-05 12:50:48 0 [Note] InnoDB: Buffer pool(s) load completed at 200305 12:50:48
2020-03-05 12:50:48 0 [Note] Server socket created on IP: '::'.
2020-03-05 12:50:48 0 [ERROR] Can't start server: Bind on TCP/IP port. Got error: 10048: Only one usage of each socket address (protocol/network address/port) is normally permitted.


2020-03-05 12:50:48 0 [ERROR] Do you already have another mysqld server running on port: 3306 ?
2020-03-05 12:50:48 0 [ERROR] Aborting

这些错误的原因是什么,我该如何纠正它们?

【问题讨论】:

【参考方案1】:

关于这个问题,请访问:

c:\xampp\mysql\data\

并删除除目录之外的所有文件。

以防万一保留my.ini,如果再次出错,请删除my.ini

【讨论】:

尝试更改mysql端口可能另一个程序正在使用相同的端口号 怎么样?更改mysql端口? 这里是链接:***.com/questions/18177148/xampp-mysql-does-not-start/… 你拯救了这一天。我的备份软件损坏了 mysql/data 文件,尤其是 ibdata。我删除它并重新运行。它创建了新文件并启动了服务器【参考方案2】:

非常非常简单

打开 xampp > mysql > 备份从备份文件夹复制所有内容并将所有内容粘贴到从备份文件夹复制的数据文件夹中

重新启动 xampp 并全部启动。谢谢。

【讨论】:

这是非常简单的方法。 如果这很容易,问题可能不在***上。说某事很容易是非常主观的。一个很好的解释它是如何工作的,通常效果最好

以上是关于MySQL 会话不会在 XAMPP 上启动的主要内容,如果未能解决你的问题,请参考以下文章

XAMPP - 未配置会话缓存 [提示:SSLSessionCache]

为啥 MySQL 不会在我的 XAMPP 安装上启动?

MySQL (Xampp) 不会在 Windows 8.1 上启动

MySQL 不会在 XAMPP 服务器上启动

MySQL 不会在 XAMPP 服务器上启动

Xampp 不会在 Mac OSX 上启动 MySQL 服务器?