当我使用 XAMPP 服务器时 MySQL 将无法运行

2024-03-09

这是我在 XAMPP 上运行 MySQL 时的错误日志。我不知道如何修复它,它总是卡在尝试启动 MySQL 服务上。

我尝试更改端口,但结果仍然相同。 也尝试过重新安装但是问题还是一样

提前谢谢你。我得到的错误如下

    2015-11-10 15:26:56 10fc 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.
    2015-11-10 15:26:56 4348 [Note] InnoDB: Using mutexes to ref count buffer pool pages
    2015-11-10 15:26:56 4348 [Note] InnoDB: The InnoDB memory heap is disabled
    2015-11-10 15:26:56 4348 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
    2015-11-10 15:26:56 4348 [Note] InnoDB: Memory barrier is not used
    2015-11-10 15:26:56 4348 [Note] InnoDB: Compressed tables use zlib 1.2.3
    2015-11-10 15:26:56 4348 [Note] InnoDB: Not using CPU crc32 instructions
    2015-11-10 15:26:56 4348 [Note] InnoDB: Initializing buffer pool, size = 16.0M
    2015-11-10 15:26:56 4348 [Note] InnoDB: Completed initialization of buffer pool
    2015-11-10 15:26:56 4348 [Note] InnoDB: Highest supported file format is Barracuda.
    2015-11-10 15:26:57 4348 [Note] InnoDB: 128 rollback segment(s) are active.
    2015-11-10 15:26:57 4348 [Note] InnoDB: Waiting for purge to start
    2015-11-10 15:26:57 4348 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.26-74.0 started; log sequence number 1835027
    2015-11-10 15:26:57 6140 [Note] InnoDB: Dumping buffer pool(s) not yet started
    2015-11-10 15:26:57 4348 [Note] Plugin 'FEEDBACK' is disabled.
    2015-11-10 15:26:57 4348 [Note] Server socket created on IP: '::'.
    2015-11-10 15:26:57 4348 [Note] Event Scheduler: Loaded 0 events
    2015-11-10 15:26:57 4348 [Note] C:\xampp\mysql\bin\mysqld.exe: ready for connections.
    Version: '10.1.8-MariaDB'  socket: ''  port: 3306  mariadb.org binary distribution
    2015-11-10 15:27:11 5152 [Note] C:\xampp\mysql\bin\mysqld.exe: Normal shutdown

    2015-11-10 15:27:11 5152 [Note] Event Scheduler: Purging the queue. 0 events
    2015-11-10 15:27:11 5732 [Note] InnoDB: FTS optimize thread exiting.
    2015-11-10 15:27:11 5152 [Note] InnoDB: Starting shutdown...
    2015-11-10 15:27:13 5152 [Note] InnoDB: Shutdown completed; log sequence number 1835037
    2015-11-10 15:27:13 5152 [Note] C:\xampp\mysql\bin\mysqld.exe: Shutdown complete

这是 mySQL 的配置。注意:我没有对其进行任何更改。

# 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            = 3306 
socket          = "C:/xampp/mysql/mysql.sock"


# Here follows entries for some specific programs 

# The MySQL server
[mysqld]
port= 3306
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
max_allowed_packet = 1M
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
log_error = "mysql_error.log"

# Change here for bind listening
# bind-address="127.0.0.1" 
# bind-address = ::1          # for ipv6

# Where do all the plugins live
plugin_dir = "C:/xampp/mysql/lib/plugin/" 

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
# 
# commented in by lampp security
#skip-networking
#skip-federated

# Replication Master Server (default)
# binary logging is required for replication
# log-bin deactivated by default since XAMPP 1.4.11
#log-bin=mysql-bin

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id   = 1

# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
#    the syntax is:
#
#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
#    where you replace <host>, <user>, <password> by quoted strings and
#    <port> by the master's port number (3306 by default).
#
#    Example:
#
#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
#    MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
#    start replication for the first time (even unsuccessfully, for example
#    if you mistyped the password in master-password and the slave fails to
#    connect), the slave will create a master.info file, and any later
#    change in this file to the variables' values below will be ignored and
#    overridden by the content of the master.info file, unless you shutdown
#    the slave server, delete master.info and restart the slaver server.
#    For that reason, you may want to leave the lines below untouched
#    (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id       = 2
#
# The replication master for this slave - required
#master-host     =   <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user     =   <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password =   <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port     =  <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin


# Point the following paths to different dedicated disks
#tmpdir = "C:/xampp/tmp"
#log-update = /path-to-dedicated-directory/hostname

# Uncomment the following if you are using BDB tables
#bdb_cache_size = 4M
#bdb_max_lock = 10000

# Comment the following if you are using InnoDB tables
#skip-innodb
innodb_data_home_dir = "C:/xampp/mysql/data"
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = "C:/xampp/mysql/data"
#innodb_log_arch_dir = "C:/xampp/mysql/data"
## You can set .._buffer_pool_size up to 50 - 80 %
## of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M
## Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

## UTF 8 Settings
#init-connect=\'SET NAMES utf8\'
#collation_server=utf8_unicode_ci
#character_set_server=utf8
#skip-character-set-client-handshake
#character_sets-dir="C:/xampp/mysql/share/charsets"

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

我花了2天时间才找到解决方案。在这里,我们的朋友弗朗西斯发布了对我有用的解决方案。我认为问题是 mysql 文件损坏:https://stackoverflow.com/a/33413223/9106762 https://stackoverflow.com/a/33413223/9106762

只需导航到 xampp 文件夹 -> mysql -> 备份 -> 复制其中的所有文件和文件夹并将它们粘贴到 xampp/mysql/data 目录中。

这对我来说非常有用(我之前尝试更改 my.ini、端口、重置服务……但没有任何效果)。希望它也能帮助其他人。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

当我使用 XAMPP 服务器时 MySQL 将无法运行 的相关文章

  • 图像随机损坏(但刷新后加载)并显示“资源解释为图像但使用 MIME 类型 text/html 传输”

    我目前正在开发一个简单的 php 网站 问题是 我的整个网站中的图像 发生在所有 php 文件中 随机损坏并显示错误资源解释为图像 但以 MIME 类型 text html 传输但是 如果我尝试多次刷新页面 可以再次加载图像并且错误消失 我
  • Flask-login:无法理解它是如何工作的

    我试图理解如何Flask Login https flask login readthedocs org en latest works 我在他们的文档中看到他们使用预先填充的用户列表 我想使用数据库存储的用户列表 但是 我不明白其中的一些
  • PHP:读取所有传入 HTTP 请求的类 [关闭]

    就目前情况而言 这个问题不太适合我们的问答形式 我们希望答案得到事实 参考资料或专业知识的支持 但这个问题可能会引发辩论 争论 民意调查或扩展讨论 如果您觉得这个问题可以改进并可能重新开放 访问帮助中心 help reopen questi
  • PDO PHP 连接,致命错误

    我的连接类 firstcode php class DB functions public db function construct try db new PDO mysql localhost dbname xxx charset ut
  • 在哪里可以学习网络编程从入门到精通? [关闭]

    Closed 这个问题正在寻求书籍 工具 软件库等的推荐 不满足堆栈溢出指南 help closed questions 目前不接受答案 我尝试做教程 但它是无组织且无结构的 我在哪里可以学习 PHP 从初学者到大师 我正在寻找类似的网站w
  • 如何使用 Perl 更改 mysql 密码

    我需要使用 Perl 脚本更改一些 mysql 密码 以下内容在更改数据库条目时有效 但是当我针对 mysql 用户更改修改它时 它将它们重置为空白密码 最后 刷新权限 也很好 但我还没有找到方法 usr bin perl use DBI
  • 在哪里可以获得 PHP 5.3+ 的 runkit DLL 扩展?

    这是一个简单的问题 我在哪里可以获得 PHP 5 3 版本的 runkit 扩展 它的手册 http php net manual en book runkit php http php net manual en book runkit
  • 使用值填充的 Symfony2 自定义字段类型

    这是先前问题的后续问题Symfony2 自定义表单类型或扩展 https stackoverflow com questions 24079288 symfony2 custom form type or extension 我正在尝试为订
  • 如何在 Play java 中创建数据库线程池并使用该池进行数据库查询

    我目前正在使用 play java 并使用默认线程池进行数据库查询 但了解使用数据库线程池进行数据库查询可以使我的系统更加高效 目前我的代码是 import play libs Akka import scala concurrent Ex
  • Facebook API sdk 4.0 - 将照片发布到 Facebook

    我正在尝试创建一个应用程序 用户可以在其中浏览照片并将其从计算机提交到 Facebook 为此 他们首先必须将照片上传到服务器 然后使用 Facebook 请求将此图像发布到 Facebook 我正在使用多部分 表单数据 这就是我到目前为止
  • Nginx 502 网关错误。通过增加buffer来解决。为什么?

    我正在设置 LEMP 堆栈来运行 Drupal 我安装了 Nginx 和 PHP FastCGI Nginx 工作正常 但任何运行 PHP 的尝试都会出现错误 502 Bad Gateway 谷歌很快发现 nginx 502 错误网关 ht
  • 带倒计时的php循环

    假设我从 400 开始计数器 我将如何执行一个向后运行直到 0 的 foreach 循环 伪代码 i 400 foreach SOMETHING do stuff i for i 400 i gt 0 i do stuff 其他方法 i 4
  • 我可以使用 HSQLDB 进行 junit 测试克隆 mySQL 数据库吗

    我正在开发一个 spring webflow 项目 我想我可以使用 HSQLDB 而不是 mysql 进行 junit 测试吗 如何将我的 mysql 数据库克隆到 HSQLDB 如果您使用 spring 3 1 或更高版本 您可以使用 s
  • 如何处理 REST api 中的 php 通知、警告和错误?

    在 REST API 中 200 响应表明操作成功 PHP 默认情况下直接在响应正文中输出错误消息 而不更改响应代码 在 SPA 中 用户无法直接看到响应文本 因此 当应用程序未按预期工作时 我通过 FireBug 检查响应正文 以检查可能
  • PHP 接口有属性吗?

    PHP 中的接口有属性 还是只有方法 您可以在 DocBlock 中为接口声明属性 然后 IDE 将提示接口的这些属性 PhpStorm 会这样做 但这不会强制在实现类中实际实现这些字段 例如 property string passwor
  • SQL不允许表中有重复记录

    如何使其不添加重复项 我想让它通过 ID 之外的所有其他列进行检查 我希望这个无效 ID col1 col2 col3 1 first middle last ID col1 col2 col3 2 first middle last 我希
  • PHP 检查当前日期是在设定日期之前还是之后

    我从数据库中提取一个日期 其格式为 dd mm YYYY 我想做的是检查当前日期 如果当前日期早于数据库中的日期 则需要打印数据库日期 如果是在之后 则需要打印 继续 有人能指出我正确的方向吗 if strtotime database d
  • 如何在 PHP 5.6 中通过 php.ini 设置“verify_peer_name=false”SSL 上下文选项

    案例 我想打开 SSL 连接localhost而 SSL 证书是 FQDN 的问题 问题 没有进行特殊处理就行 下面的程序失败并显示以下消息 PHP Warning stream socket enable crypto Peer cert
  • 如何修改现有表以添加时区

    我有一个包含 500 多个表的大型应用程序 我必须将应用程序转换为时区感知 当前应用程序使用new java util Date GETDATE 与服务器的时区 即没有任何时区支持 我已将这项任务分为几个步骤 以便于开发 我确定的第一个步骤
  • 如何从日期中查找该月的最后一天?

    如何在 PHP 中获取该月的最后一天 Given a date 2009 11 23 我要2009 11 30 并给出 a date 2009 12 23 我要2009年12月31日 t返回给定日期所在月份的天数 请参阅的文档date ht

随机推荐