我在笔记本电脑上安装了xampp版本3.2.1,之前mysql可以正常运行,但是突然间,在apache和其他服务器运行时mysql停止了工作。 当我单击启动mysql时显示此错误 我使用Windows 10
8:52:32 AM [mysql] Status change detected: running
8:52:40 AM [mysql] Status change detected: stopped
8:52:40 AM [mysql] Error: MySQL shutdown unexpectedly.
8:52:40 AM [mysql] This may be due to a blocked port, missing dependencies,
8:52:40 AM [mysql] improper privileges, a crash, or a shutdown by another method.
8:52:40 AM [mysql] Press the Logs button to view error logs and check
8:52:40 AM [mysql] the Windows Event Viewer for more clues
8:52:40 AM [mysql] If you need more help, copy and post this
8:52:40 AM [mysql] entire log window on the forums
然后我检查了日志文件,这就是我在其中找到的
`
2018-06-23 08:52:32 2354 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
180623 8:52:32 [Note] InnoDB: Using mutexes to ref count buffer pool pages
180623 8:52:32 [Note] InnoDB: The InnoDB memory heap is disabled
180623 8:52:32 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
180623 8:52:32 [Note] InnoDB: Memory barrier is not used
180623 8:52:32 [Note] InnoDB: Compressed tables use zlib 1.2.3
180623 8:52:32 [Note] InnoDB: Not using CPU crc32 instructions
180623 8:52:32 [Note] InnoDB: Initializing buffer pool, size = 16.0M
180623 8:52:32 [Note] InnoDB: Completed initialization of buffer pool
180623 8:52:32 [Note] InnoDB: Highest supported file format is Barracuda.
180623 8:52:32 [Note] InnoDB: 128 rollback segment(s) are active.
180623 8:52:32 [Note] InnoDB: Waiting for purge to start
180623 8:52:33 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.22-72.0 started; log sequence number 1600924
180623 8:52:33 [Note] Plugin 'FEEDBACK' is disabled.
180623 8:52:33 [Note] Server socket created on IP: '::'.
180623 8:52:33 [Warning] 'db' entry 'size of datafile is: 1907 should be: 1760
180409 15:17:15 [error] mysql.db: got error: 0 when reading datafile at record: 3
180409 15:17:15 [error] got an error from unknown thread, ha _myisam.cc:952
180409 15:17:15 [Warning] Recove@80409 15:17:15 [Warning] Checking table: '.\mysql\db'
180409 15:17:15 [ERROR] mysql.db: 1 client is using or hasn't closed the table properly
180409 15:17:15 [ERROR] mysql.db:' had database in mixed case that has been forced to lowercase because lower_case_table_names is set. It will not be possible to remove this privilege using REVOKE.
180623 8:52:33 [ERROR] Missing system table mysql.roles_mapping; please run mysql_upgrade to create it
180623 8:52:33 [ERROR] Incorrect definition of table mysql.event: expected column 'sql_mode' at position 14 to have type set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH'), found type set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_A
180623 8:52:33 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
180623 8:52:33 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' doesn't exist
180623 8:52:33 [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.
180623 8:52:33 [Note] Started replication for '180401 18:51:15 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
'
180623 8:52:33 [ERROR] Master '180401 18:51:15 [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, Internal MariaDB error code: 1146
180623 8:52:33 [Note] Master '180401 18:51:15 [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-180401@002018@003a51@003a15@0020@005bnote@005d@0020c@003a@005cxampp@005cmysql@005cbin@005cmysqld@002eexe@003a@0020ready@0020for@0020connections@002e@000d.000095' position: 4
180623 8:52:33 [ERROR] Master '180401 18:51:15 [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
180623 8:52:33 [ERROR] Failed to open the relay log '.\mysql-relay-bin-version@003a@0020@002710@002e0@002e17@002dmariadb@0027@0020@0020socket@003a@0020@0027@0027@0020@0020port@003a@00203306@0020@0020mariadb@002eorg@0020binary@0020distribution@000d.000036' (relay_log_pos 4)
180623 8:52:33 [ERROR] Master '180401 18:51:15 [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, Internal MariaDB error code: 1146
180623 8:52:33 [Note] Master '180401 18:51:15 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
': Slave I/O thread killed while connecting to master
180623 8:52:33 [ERROR] Could not find target log during relay log initialization
180623 8:52:33 [Note] Master '180401 18:51:15 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
': Slave I/O thread exiting, read up to log 'FIRST', position 4
180623 8:52:33 [ERROR] Initialized Master_info from 'master-version@003a@0020@002710@002e0@002e17@002dmariadb@0027@0020@0020socket@003a@0020@0027@0027@0020@0020port@003a@00203306@0020@0020mariadb@002eorg@0020binary@0020distribution@000d.info' failed
180623 8:52:33 [Warning] Reading of some Master_info entries failed
180623 8:52:33 [ERROR] Failed to initialize multi master structures
180623 8:52:33 [ERROR] Aborting
180623 8:52:33 [Note] Master '180401 18:51:15 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
': Error reading relay log event: slave SQL thread was killed
180623 8:52:33 [Note] InnoDB: FTS optimize thread exiting.
180623 8:52:33 [Note] InnoDB: Starting shutdown...
180623 8:52:35 [Note] InnoDB: Shutdown completed; log sequence number 1600934
180623 8:52:35 [Note] C:\xampp\mysql\bin\mysqld.exe: Shutdown complete`
答案 0 :(得分:5)
在我的情况下,删除/ mysql / data文件夹中的所有文件(没有文件夹!),/ mysql / data / my.ini和/ data / ibdata1除外。
答案 1 :(得分:1)
将文件和文件夹从 C:\xampp\mysql\backup
复制到 C:\xampp\mysql\data
并删除我所有的数据库文件夹对我有用。
但首先尝试不要删除您的数据库文件。
答案 2 :(得分:0)
删除mysql.pid文件。 您也可以删除其他master- *文件
答案 3 :(得分:0)
删除所有资料文件,multi-master.info对我有用