【问题标题】:MySQL shutdown unexpectedly on XAMPP - Server socket created on IP: '::'MySQL 在 XAMPP 上意外关闭 - 在 IP 上创建服务器套接字:'::'
【发布时间】:2020-06-15 13:06:21
【问题描述】:

我对 XAMPP 还是很陌生,它一直运行良好,直到我今天早上开始工作。这是错误日志文件信息。当我尝试启动 MySQL 时,它会打开然后停止。如果需要,我宁愿不重新安装,但如果需要的话可以。

InnoDB: using atomic writes.
2020-06-15  6:53:59 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2020-06-15  6:53:59 0 [Note] InnoDB: Uses event mutexes
2020-06-15  6:53:59 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-06-15  6:53:59 0 [Note] InnoDB: Number of pools: 1
2020-06-15  6:53:59 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-06-15  6:53:59 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2020-06-15  6:53:59 0 [Note] InnoDB: Completed initialization of buffer pool
2020-06-15  6:54:00 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-06-15  6:54:00 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-06-15  6:54:00 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-06-15  6:54:00 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2020-06-15  6:54:00 0 [Note] InnoDB: 10.4.11 started; log sequence number 8795036; transaction id 3060
2020-06-15  6:54:00 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2020-06-15  6:54:00 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-06-15  6:54:00 0 [Note] Server socket created on IP: '::'.

这里是 my.ini 文件。

# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# You can copy this file to
# C:/xampp/mysql/bin/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is C:/xampp/mysql/data) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
# password       = your_password 
port=3307
socket="C:/xampp/mysql/mysql.sock"


# Here follows entries for some specific programs 

# The MySQL server
default-character-set=utf8mb4
[mysqld]
port=3307
socket="C:/xampp/mysql/mysql.sock"
basedir="C:/xampp/mysql"
tmpdir="C:/xampp/tmp"
datadir="C:/xampp/mysql/data"
pid_file="mysql.pid"
# enable-named-pipe
key_buffer=16M

【问题讨论】:

  • 这是一个编程网站。您可能会在 superuser.com 上获得更好的帮助
  • 定期启动的日志中存在nio问题,所以请说明您遇到的问题,或者向我们展示带有实际错误的错误日志
  • 我能够通过删除 XAMPP 并重新安装它来使其工作。

标签: mysql xampp


【解决方案1】:

注意!请不要删除 ibdata1 文件! 首先备份 MySQL 文件夹 'mysql/data'

  1. 将mysql/data文件夹中的所有文件+文件夹备份到mysql/data_old_backup

  2. 有时 XAMPP MySQL 服务停止工作,在我的例子中,XAMPP 控制面板中的原因是:“错误:MySQL 意外关闭”并带有相同的错误日志

解决方案:

  1. 我已经修复了同样的问题,将所有文件+文件夹从 xampp/mysql/backup/ 复制(+覆盖)到 xampp/mysql/data/
  2. 您可能在步骤 1 之后丢失了您的 mysql 根密码,您的 mysql 密码现在为空。
  3. 现在,从 "mysql/data_old_backup/ibdata1" 的备份文件夹中复制(+覆盖)文件 ibdata1xampp/mysql/data/
    (因为您想恢复所有数据)
  4. 从 XAMPP 控制面板启动 MySQL。

它应该可以工作

【讨论】:

  • 谢谢!为我工作,我所有的最新变化都存在。是的!
猜你喜欢
  • 2021-07-25
  • 2015-08-11
  • 2021-03-18
  • 1970-01-01
  • 2021-04-04
  • 2020-10-26
  • 1970-01-01
  • 2011-11-21
  • 2015-06-21
相关资源
最近更新 更多