gpt4 book ai didi

mysql - 之前工作正常后,突然 'MySQL shutdown unexpectedly' 出现在 Xampp 中

转载 作者:行者123 更新时间:2023-11-29 15:32:16 25 4
gpt4 key购买 nike

以前我遇到过一个问题,除非我不在 my.ini 中包含 skip-grant-tables,否则我无法访问 phpmyadmin。之后我用来修复用户表,因为它总是显示一些问题。但为了解决这个问题,我从 ..\xampp\mysql\data\mysql 文件夹中删除了 User.FRM、User.MYD、User.MYI 文件,并从备份目录 ..\xampp\mysql\backup\mysql 复制了相同的文件到..\xampp\mysql\data\mysql。之后,我能够毫无错误地访问 phpmyadmin(使用 skip-grant-tables)并在用户表中插入用户。从 my.ini 中删除 skip-grant-tables 并重新启动服务器会导致此问题,Mysql 运行一秒钟然后停止并出现以下错误:

  Error: MySQL shutdown unexpectedly.
[mysql] This may be due to a blocked port, missing dependencies,
[mysql] improper privileges, a crash, or a shutdown by another method.
[mysql] Press the Logs button to view error logs and check
[mysql] the Windows Event Viewer for more clues
[mysql] If you need more help, copy and post this
[mysql] entire log window on the forums

现在,无论我是否包含 skip-grant-tables,Mysql 都会意外关闭

我尝试过的事情:

  1. 删除了 ibdata1、ib_logfile1、ib_logfile0 文件并重新启动服务器
  2. 更改了 Mysql 甚至 Apache 的端口。

  3. 在 mysql 的 [mysqld] 部分下面添加了以下行配置文件(my.ini)并重新启动apache Web服务器和mysql服务。

    [mysqld]
    innodb_force_recovery = 1
  4. 以管理员身份启动 Xampp 并尝试启动 MySql

都没有解决问题,Mysql还是意外关闭

MySQL_error.log 包含

        [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
[Note] InnoDB: Uses event mutexes
[Note] InnoDB: Compressed tables use zlib 1.2.11
[Note] InnoDB: Number of pools: 1
[Note] InnoDB: Using SSE2 crc32 instructions
[Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
[Note] InnoDB: Completed initialization of buffer pool
[Note] InnoDB: 128 out of 128 rollback segments are active.
[Note] InnoDB: Creating shared tablespace for temporary tables
[Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
[Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
[Note] InnoDB: 10.3.16 started; log sequence number 1604074; transaction id 9
[Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
[Note] InnoDB: Buffer pool(s) load completed at 191030 9:59:17
[Note] Plugin 'FEEDBACK' is disabled.
[Note] Server socket created on IP: '::'.

有人可以帮忙看看是什么原因吗?是否是因为我从mysql中删除了User.FRM、User.MYD、User.MYI文件并从备份文件夹中复制了它们?这个问题有什么解决办法吗?

更新删除 ..\xampp\mysql\data 中除文件夹外的所有文件,并以管理员权限重新启动 xampp 并启动​​ MySql。现在它没有关闭但是 phpmyadmin 显示以下错误

      MySQL said: Documentation

Cannot connect: invalid settings.
mysqli_real_connect(): (HY000/2002): No connection could be made
because the target machine actively refused it.

Connection for controluser as defined in your configuration failed.
mysqli_real_connect(): (HY000/2002): No connection could be made
because the target machine actively refused it.

phpMyAdmin tried to connect to the MySQL server, and the server
rejected the connection. You should check the host, username and
password in your configuration and make sure that they correspond to
the information given by the administrator of the MySQL server.

如有任何帮助,我们将不胜感激

最佳答案

我已经卸载并重新安装了 Xampp,这似乎可以解决问题非常感谢大家对大家的大力帮助。

关于mysql - 之前工作正常后,突然 'MySQL shutdown unexpectedly' 出现在 Xampp 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58620360/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com