我仍然是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发布于 2021-06-18 07:51:12
小心!请不要删除ibdata1文件!首先采取' MySQL /data‘文件夹的备份mysql
mysql/data_old_backup
。
解决方案:
我已经修复了同样的问题,从xampp/mysql/backup/复制(+改写)所有的files+folder到xampp/mysql/data/
(因为您想恢复所有数据)
它应该能工作
发布于 2022-09-27 23:43:33
Priyesh的回答引导我找到了解决方案(谢谢@Priyesh!!+1)。虽然有点不清楚,但我确实采取了一些额外的步骤来使它发挥作用。最后,我丢失的唯一数据是我所有的DB用户。
具体来说,我在我的例子中使用了XAMPP/MariaDB。这在其他情况下也可能有效,但我无法证实:
/mysql/文件夹中,将/data/文件夹重命名为其他东西(例如,/old-data/),因为它包含所有数据库数据和表描述,您不想丢失。然后,
/mysql/下的/backup/文件夹,并将其再次粘贴到/mysql/下,并将其重命名为/data/。这个/backup/文件夹看起来是一个完全空白的数据库设置。此时,mysql在从XAMPP控制面板运行它时应该再次启动。如果您试图使用phpmyadmin或应用程序访问它,请注意用户名是“root”,密码为空(‘)。无论如何,暂时别管它。
/old-data/文件夹并复制ibdata1文件并将其粘贴到新的/data/文件夹中,替换那里的一个./old-data/文件夹中有许多子文件夹,每个子文件夹都有一个数据库的名称。由于核心数据库已经从/backup/复制到正确工作,所以请将除这四个数据库文件夹之外的所有数据库文件夹复制到新的/data/文件夹中。具体来说,跳过数据库文件夹/mysql/、/performance_schema/、/phpmyadmin/和/phpmyadmin/。此时,数据应该被恢复--所有东西,除非此时mysql用户可能会被破坏(我正在使用HeidiSQL,当我试图访问用户管理器时,它会给我一个错误)。
要解决这个问题,请转到phpmyadmin,再次登录,用户名:'root‘/
mysql数据库。然后,选择“所有表”,然后从“批量操作”菜单中选择“修复表”来修复所有表。如果您不使用XAMPP,您应该能够使用SQL REPAIR TABLE mysql.table_name;为每个mysql数据库表.完成这一任务。
完成后,用户将被重置,但一切都应该再次工作。唯一可能丢失的数据是用户。
我知道每一个环境都是不同的,根据环境的不同,某些东西可能会起作用,而另一些则不行。因此,如果重要的话,我的环境是,
7.4.27
(p.s.在我的例子中,我相信mysql由于Windows更新而变得腐败)
https://stackoverflow.com/questions/62388844
复制相似问题