MySQL 在 XAMPP 上意外关闭 - 在 IP: '::' 上创建的服务器套接字

Cob*_*tes 6 mysql xampp

我对 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: '::'.
Run Code Online (Sandbox Code Playgroud)

这是 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
Run Code Online (Sandbox Code Playgroud)

Pri*_*esh 15

注意!请不要删除 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 root密码,你的mysql密码现在为空。
  3. 现在,将备份文件夹中的文件ibdata1“mysql/data_old_backup/ibdata1”复制(+覆盖)到xampp/mysql/data/
    (因为您想恢复所有数据)
  4. 从 XAMPP 控制面板启动 MySQL。

应该有效