【问题标题】:Xampp MySQL shutdown unexpectedly (problem is not the port)Xampp MySQL 意外关闭(问题不在于端口)
【发布时间】:2020-09-05 07:55:40
【问题描述】:

所以,昨晚我关闭了计算机,今天早上当我试图通过 Xampp 控制面板启动 MySQL 时,我收到了臭名昭著的“错误:MySQL 意外关闭”。

我知道之前已经有人问过这个问题,但我已经搜索了解决方案(直到 Google 结果的第三页!),但没有任何效果。 到目前为止,我已经尝试过: - 删除 mysql/data/ibdata1 文件 - 更改端口(即使我检查了端口 3306 上没有任何工作,端口 3*** 上没有任何工作) - 重新启动 - mysql_升级 - 祈祷 - 以管理员身份开始 - 检查是否从服务中禁用了 mysql 服务(不是) - 检查机器上是否安装了另一个 MySQL(连接到端口解决方案) - 除了 Xampp 之外没有安装其他任何东西。

日志文件:

2020-05-19 12:22:33 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2020-05-19 12:22:33 0 [Note] InnoDB: Uses event mutexes
2020-05-19 12:22:33 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-05-19 12:22:33 0 [Note] InnoDB: Number of pools: 1
2020-05-19 12:22:33 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-05-19 12:22:33 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2020-05-19 12:22:33 0 [Note] InnoDB: Completed initialization of buffer pool
2020-05-19 12:22:33 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-05-19 12:22:33 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-05-19 12:22:33 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-05-19 12:22:33 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2020-05-19 12:22:33 0 [Note] InnoDB: Waiting for purge to start
2020-05-19 12:22:33 0 [Note] InnoDB: 10.4.6 started; log sequence number 113899; transaction id 9
2020-05-19 12:22:33 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2020-05-19 12:22:33 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-05-19 12:22:33 0 [Note] InnoDB: Buffer pool(s) load completed at 200519 12:22:33
2020-05-19 12:22:33 0 [Note] Server socket created on IP: '::'.
2020-05-19 12:22:33 6 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1932: Table 'mysql.gtid_slave_pos' doesn't exist in engine
2020-05-19 12:22:33 7 [Note] Reading Master_info: 'master-2020@002d03@002d16@002014@003a08@003a15@00200@0020@005bnote@005d@0020reading@0020of@0020all@0020master_info@0020entries@0020succeeded@000d.info'  Relay_info:'relay-log-2020@002d03@002d16@002014@003a08@003a15@00200@0020@005bnote@005d@0020reading@0020of@0020all@0020master_info@0020entries@0020succeeded@000d.info'
2020-05-19 12:22:33 7 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--log-basename=#' or '--relay-log=mysql-relay-bin' to avoid this problem.
2020-05-19 12:22:33 7 [Note] Initialized Master_info from 'master-2020@002d03@002d16@002014@003a08@003a15@00200@0020@005bnote@005d@0020reading@0020of@0020all@0020master_info@0020entries@0020succeeded@000d.info'
2020-05-19 12:22:33 7 [Note] Added new Master_info '2020-03-16 14:08:15 0 [Note] Reading of all Master_info entries succeeded
' to hash table
2020-05-19 12:22:33 7 [Note] Started replication for '2020-03-16 14:08:15 0 [Note] Reading of all Master_info entries succeeded
'
2020-05-19 12:22:33 8 [ERROR] Master '2020-03-16 14:08:15 0 [Note] Reading of all Master_info entries succeeded
': Slave I/O: Unable to load replication GTID slave state from mysql.gtid_slave_pos: Table 'mysql.gtid_slave_pos' doesn't exist in engine, Internal MariaDB error code: 1932
2020-05-19 12:22:33 9 [Note] Master '2020-03-16 14:08:15 0 [Note] Reading of all Master_info entries succeeded
': Slave SQL thread initialized, starting replication in log 'FIRST' at position 0, relay log '.\mysql-relay-bin-2020@002d03@002d16@002014@003a08@003a15@00200@0020@005bnote@005d@0020reading@0020of@0020all@0020master_info@0020entries@0020succeeded@000d.000001' position: 4
2020-05-19 12:22:33 7 [Note] Reading Master_info: 'master-2020@002d03@002d16@002014@003a08@003a15@00200@0020@005bnote@005d@0020added@0020new@0020master_info@0020@0027@0027@0020to@0020hash@0020table@000d.info'  Relay_info:'relay-log-2020@002d03@002d16@002014@003a08@003a15@00200@0020@005bnote@005d@0020added@0020new@0020master_info@0020@0027@0027@0020to@0020hash@0020table@000d.info'
2020-05-19 12:22:33 9 [ERROR] Master '2020-03-16 14:08:15 0 [Note] Reading of all Master_info entries succeeded
': Slave SQL: Unable to load replication GTID slave state from mysql.gtid_slave_pos: Table 'mysql.gtid_slave_pos' doesn't exist in engine, Internal MariaDB error code: 1932
2020-05-19 12:22:33 8 [Note] Master '2020-03-16 14:08:15 0 [Note] Reading of all Master_info entries succeeded
': Slave I/O thread: Start asynchronous replication to master '@:3306' in log '' at position 4
2020-05-19 12:22:33 8 [ERROR] Master '2020-03-16 14:08:15 0 [Note] Reading of all Master_info entries succeeded
': Slave I/O: Fatal error: Invalid (empty) username when attempting to connect to the master server. Connection attempt terminated. Internal MariaDB error code: 1593
2020-05-19 12:22:33 8 [Note] Master '2020-03-16 14:08:15 0 [Note] Reading of all Master_info entries succeeded
': Slave I/O thread killed while connecting to master
2020-05-19 12:22:33 8 [Note] Master '2020-03-16 14:08:15 0 [Note] Reading of all Master_info entries succeeded
': Slave I/O thread exiting, read up to log 'FIRST', position 4
2020-05-19 12:22:33 7 [Note] Initialized Master_info from 'master-2020@002d03@002d16@002014@003a08@003a15@00200@0020@005bnote@005d@0020added@0020new@0020master_info@0020@0027@0027@0020to@0020hash@0020table@000d.info'
2020-05-19 12:22:33 7 [Note] Added new Master_info '2020-03-16 14:08:15 0 [Note] Added new Master_info '' to hash table
' to hash table
2020-05-19 12:22:33 7 [Note] Started replication for '2020-03-16 14:08:15 0 [Note] Added new Master_info '' to hash table
'
2020-05-19 12:22:33 11 [Note] Master '2020-03-16 14:08:15 0 [Note] Added new Master_info '' to hash table
': Slave SQL thread initialized, starting replication in log 'FIRST' at position 0, relay log '.\mysql-relay-bin-2020@002d03@002d16@002014@003a08@003a15@00200@0020@005bnote@005d@0020added@0020new@0020master_info@0020@0027@0027@0020to@0020hash@0020table@000d.000001' position: 4
2020-05-19 12:22:33 7 [Note] Reading Master_info: 'master-2020@002d03@002d16@002014@003a08@003a15@00200@0020@005bnote@005d@0020c@003a@005cxampp@005cmysql@005cbin@005cmysqld@002eexe@003a@0020ready@0020for@0020connections@002e@000d.info'  Relay_info:'relay-log-2020@002d03@002d16@002014@003a08@003a15@00200@0020@005bnote@005d@0020c@003a@005cxampp@005cmysql@005cbin@005cmysqld@002eexe@003a@0020ready@0020for@0020connections@002e@000d.info'
2020-05-19 12:22:33 10 [ERROR] Master '2020-03-16 14:08:15 0 [Note] Added new Master_info '' to hash table
': Slave I/O: Unable to load replication GTID slave state from mysql.gtid_slave_pos: Table 'mysql.gtid_slave_pos' doesn't exist in engine, Internal MariaDB error code: 1932
2020-05-19 12:22:33 11 [ERROR] Master '2020-03-16 14:08:15 0 [Note] Added new Master_info '' to hash table
': Slave SQL: Unable to load replication GTID slave state from mysql.gtid_slave_pos: Table 'mysql.gtid_slave_pos' doesn't exist in engine, Internal MariaDB error code: 1932
2020-05-19 12:22:33 10 [Note] Master '2020-03-16 14:08:15 0 [Note] Added new Master_info '' to hash table
': Slave I/O thread: Start asynchronous replication to master '@:3306' in log '' at position 4
2020-05-19 12:22:33 10 [ERROR] Master '2020-03-16 14:08:15 0 [Note] Added new Master_info '' to hash table
': Slave I/O: Fatal error: Invalid (empty) username when attempting to connect to the master server. Connection attempt terminated. Internal MariaDB error code: 1593
2020-05-19 12:22:33 10 [Note] Master '2020-03-16 14:08:15 0 [Note] Added new Master_info '' to hash table
': Slave I/O thread killed while connecting to master
2020-05-19 12:22:33 10 [Note] Master '2020-03-16 14:08:15 0 [Note] Added new Master_info '' to hash table
': Slave I/O thread exiting, read up to log 'FIRST', position 4
2020-05-19 12:22:33 7 [Note] Initialized Master_info from 'master-2020@002d03@002d16@002014@003a08@003a15@00200@0020@005bnote@005d@0020c@003a@005cxampp@005cmysql@005cbin@005cmysqld@002eexe@003a@0020ready@0020for@0020connections@002e@000d.info'
2020-05-19 12:22:33 7 [Note] Added new Master_info '2020-03-16 14:08:15 0 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
' to hash table
2020-05-19 12:22:33 7 [Note] Started replication for '2020-03-16 14:08:15 0 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
'
2020-05-19 12:22:33 13 [Note] Master '2020-03-16 14:08:15 0 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
': Slave SQL thread initialized, starting replication in log 'FIRST' at position 0, relay log '.\mysql-relay-bin-2020@002d03@002d16@002014@003a08@003a15@00200@0020@005bnote@005d@0020c@003a@005cxampp@005cmysql@005cbin@005cmysqld@002eexe@003a@0020ready@0020for@0020connections@002e@000d.000001' position: 4
2020-05-19 12:22:33 12 [ERROR] Master '2020-03-16 14:08:15 0 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
': Slave I/O: Unable to load replication GTID slave state from mysql.gtid_slave_pos: Table 'mysql.gtid_slave_pos' doesn't exist in engine, Internal MariaDB error code: 1932
2020-05-19 12:22:33 7 [Note] Reading Master_info: 'master-version@003a@0020@002710@002e4@002e6@002dmariadb@0027@0020@0020socket@003a@0020@0027@0027@0020@0020port@003a@00203306@0020@0020mariadb@002eorg@0020binary@0020distribution@000d.info'  Relay_info:'relay-log-version@003a@0020@002710@002e4@002e6@002dmariadb@0027@0020@0020socket@003a@0020@0027@0027@0020@0020port@003a@00203306@0020@0020mariadb@002eorg@0020binary@0020distribution@000d.info'
2020-05-19 12:22:33 13 [ERROR] Master '2020-03-16 14:08:15 0 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
': Slave SQL: Unable to load replication GTID slave state from mysql.gtid_slave_pos: Table 'mysql.gtid_slave_pos' doesn't exist in engine, Internal MariaDB error code: 1932
2020-05-19 12:22:33 12 [Note] Master '2020-03-16 14:08:15 0 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
': Slave I/O thread: Start asynchronous replication to master '@:3306' in log '' at position 4
2020-05-19 12:22:33 12 [ERROR] Master '2020-03-16 14:08:15 0 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
': Slave I/O: Fatal error: Invalid (empty) username when attempting to connect to the master server. Connection attempt terminated. Internal MariaDB error code: 1593
2020-05-19 12:22:33 12 [Note] Master '2020-03-16 14:08:15 0 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
': Slave I/O thread killed while connecting to master
2020-05-19 12:22:33 12 [Note] Master '2020-03-16 14:08:15 0 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
': Slave I/O thread exiting, read up to log 'FIRST', position 4
2020-05-19 12:22:33 7 [ERROR] Failed to open the relay log '.\mysql-relay-bin-version@003a@0020@002710@002e4@002e6@002dmariadb@0027@0020@0020socket@003a@0020@0027@0027@0020@0020port@003a@00203306@0020@0020mariadb@002eorg@0020binary@0020distribution@000d.000001' (relay_log_pos 4)
2020-05-19 12:22:33 7 [ERROR] Could not find target log during relay log initialization
2020-05-19 12:22:33 7 [ERROR] Initialized Master_info from 'master-version@003a@0020@002710@002e4@002e6@002dmariadb@0027@0020@0020socket@003a@0020@0027@0027@0020@0020port@003a@00203306@0020@0020mariadb@002eorg@0020binary@0020distribution@000d.info' failed
2020-05-19 12:22:33 7 [Note] Added new Master_info 'Version: '10.4.6-MariaDB'  socket: ''  port: 3306  mariadb.org binary distribution
' to hash table
2020-05-19 12:22:33 7 [Note] Reading Master_info: 'master-2020@002d03@002d16@002014@003a08@003a15@00200@0020@005bnote@005d@0020innodb@003a@0020buffer@0020pool@0028s@0029@0020load@0020completed@0020at@0020200316@002014@003a08@003a15@000d.info'  Relay_info:'relay-log-2020@002d03@002d16@002014@003a08@003a15@00200@0020@005bnote@005d@0020innodb@003a@0020buffer@0020pool@0028s@0029@0020load@0020completed@0020at@0020200316@002014@003a08@003a15@000d.info'
2020-05-19 12:22:33 7 [Note] Initialized Master_info from 'master-2020@002d03@002d16@002014@003a08@003a15@00200@0020@005bnote@005d@0020innodb@003a@0020buffer@0020pool@0028s@0029@0020load@0020completed@0020at@0020200316@002014@003a08@003a15@000d.info'
2020-05-19 12:22:33 7 [Note] Added new Master_info '2020-03-16 14:08:15 0 [Note] InnoDB: Buffer pool(s) load completed at 200316 14:08:15
' to hash table
2020-05-19 12:22:33 7 [Note] Started replication for '2020-03-16 14:08:15 0 [Note] InnoDB: Buffer pool(s) load completed at 200316 14:08:15
'
2020-05-19 12:22:33 0 [Warning] Reading of some Master_info entries failed
2020-05-19 12:22:33 0 [ERROR] Failed to initialize multi master structures
2020-05-19 12:22:33 15 [Note] Master '2020-03-16 14:08:15 0 [Note] InnoDB: Buffer pool(s) load completed at 200316 14:08:15
': Slave SQL thread initialized, starting replication in log 'FIRST' at position 0, relay log '.\mysql-relay-bin-2020@002d03@002d16@002014@003a08@003a15@00200@0020@005bnote@005d@0020innodb@003a@0020buffer@0020pool@0028s@0029@0020load@0020completed@0020at@0020200316@002014@003a08@003a15@000d.000001' position: 4
2020-05-19 12:22:33 0 [ERROR] Aborting
2020-05-19 12:22:33 14 [ERROR] Master '2020-03-16 14:08:15 0 [Note] InnoDB: Buffer pool(s) load completed at 200316 14:08:15
': Slave I/O: Unable to load replication GTID slave state from mysql.gtid_slave_pos: Table 'mysql.gtid_slave_pos' doesn't exist in engine, Internal MariaDB error code: 1932
2020-05-19 12:22:33 15 [ERROR] Master '2020-03-16 14:08:15 0 [Note] InnoDB: Buffer pool(s) load completed at 200316 14:08:15
': Slave SQL: Unable to load replication GTID slave state from mysql.gtid_slave_pos: Table 'mysql.gtid_slave_pos' doesn't exist in engine, Internal MariaDB error code: 1932
2020-05-19 12:22:33 14 [ERROR] Master '2020-03-16 14:08:15 0 [Note] InnoDB: Buffer pool(s) load completed at 200316 14:08:15
': Slave I/O: Fatal error: Invalid (empty) username when attempting to connect to the master server. Connection attempt terminated. Internal MariaDB error code: 1593

尝试阅读错误日志,似乎问题与大多数人遇到的问题有些不同。我可能需要重新安装 Xampp,但我必须找到一种方法来保存我的数据库,我不知道这将如何发生,因为我什至无法通过 shell 转储它们。

编辑/更新:我在另一台机器上安装了 Xampp 并将数据文件夹复制到其中。它也破坏了另一台机器上的 MySQL。此时,我只想获取数据库。

【问题讨论】:

    标签: mysql xampp


    【解决方案1】:

    xampp\mysql\data 中删除所有INFO 文件,例如:

    master-2021@002d02@002d25@002010@003a32@003a57@00200@0020@005bnote@005d@0020added@0020new@0020master_info@0020@0027@0027@0020to@0020hash@0020table@000d.info
    mysql-relay-bin-2021@002d02@002d25@002010@003a32@003a57@00200@0020@005bnote@005d@0020added@0020new@0020master_info@0020@0027@0027@0020to@0020hash@0020table@000d.000001
    relay-log-2021@002d02@002d25@002010@003a32@003a57@00200@0020@005bnote@005d@0020d@003a@005cxampp@005cmysql@005cbin@005cmysqld@002eexe@003a@0020ready@0020for@0020connections@002e@000d.info
    

    【讨论】:

      【解决方案2】:

      mynotebucket.com 的这个提示帮助我修复了错误:

      • 将文件夹 xampp/mysql/data 重命名为其他名称,例如 data-org
      • 新建文件夹名称数据
      • 将所有表文件夹从 data-org 复制到 data
      • 复制 my.ini 和 ibdata1。 My.ini 包含配置信息,ibdata1 包含表定义。
      • 启动 MySQL

      【讨论】:

      • 感谢您的帮助。不幸的是,这个问题是在 5 月份提出的,从那时起我丢失了所有数据。也许将来有人会从您的回答中受益。附言提醒大家 - 定期备份您的数据!
      猜你喜欢
      • 2020-01-04
      • 1970-01-01
      • 2022-11-01
      • 2015-06-10
      • 2019-08-12
      • 2020-03-28
      相关资源
      最近更新 更多