CentOS 6.9:MySQL Daemon failed to start.

本文记录了在CentOS6.9上安装并尝试启动MySQL遇到的问题:mysqld启动失败,并提示InnoDB相关错误。日志显示数据文件ibdata1的大小与配置文件中指定的不同。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

CentOS 6.9:MySQL Daemon failed to start.

[root@Server_1 12:02:58 ~ 25]#service mysqld start
MySQL Daemon failed to start.
Starting mysqld:

[root@Server_1 12:05:40 ~ 27]#less /var/log/mysqld.log

 

2018-04-18 12:04:32 5406 [ERROR] InnoDB: auto-extending data file ./ibdata1 is of a
different size 640 pages (rounded down to MB) than specified in the .cnf file: ini
tial 768 pages, max 0 (relevant if non-zero) pages!
2018-04-18 12:04:32 5406 [ERROR] InnoDB: Could not open or create the system tables
pace. If you tried to add new data files to the system tablespace, and it failed he
re, you should now edit innodb_data_file_path in my.cnf back to what it was, and re
move the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote
those files full of zeros, but did not yet use them in any way. But be careful: do
not remove old data files which contain your precious data!
2018-04-18 12:04:32 5406 [ERROR] Plugin 'InnoDB' init function returned error.
2018-04-18 12:04:32 5406 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE f
ailed.
2018-04-18 12:04:32 5406 [ERROR] Unknown/unsupported storage engine: InnoDB
2018-04-18 12:04:32 5406 [ERROR] Aborting

使用的是mysql-community.repo安装的,什么都没有改,只是把5.6启用了,然后执行yum install -y mysql-community-server安装,安装完成之后启动就跑出来这个错误。

posted on 2018-06-14 13:55 Lucky_7 阅读(...) 评论(...) 编辑 收藏

Redirecting to /bin/systemctl start mysql.service Failed to start mysql.service: Unit mysql.service not found是因为系统找不到mysql.service单元。这可能是由于MySQL未正确安装或配置导致的。您可以尝试以下解决方案来解决此问题: 1. 确保您已正确安装MySQL并且服务已正确配置。您可以使用以下命令安装MySQL: - 在CentOS上:sudo yum install mysql-server - 在Ubuntu上:sudo apt-get install mysql-server 2. 检查mysql.service文件是否存在。您可以使用以下命令来查找该文件: - 在CentOS上:ls /usr/lib/systemd/system/mysql.service - 在Ubuntu上:ls /etc/systemd/system/mysql.service 3. 如果mysql.service文件不存在,您可能需要手动创建它。您可以使用以下命令创建mysql.service文件: - 在CentOS上:sudo touch /usr/lib/systemd/system/mysql.service - 在Ubuntu上:sudo touch /etc/systemd/system/mysql.service 4. 编辑mysql.service文件,并确保以下内容出现在文件中: ``` [Unit] Description=MySQL Server After=network.target [Service] ExecStart=/usr/bin/mysqld_safe --nowatch --basedir=/usr ExecStop=/usr/bin/mysqladmin shutdown User=mysql Group=mysql Restart=always [Install] WantedBy=multi-user.target ``` 5. 保存并关闭mysql.service文件。 6. 运行以下命令重新加载systemd配置: - 在CentOS上:sudo systemctl daemon-reload - 在Ubuntu上:sudo systemctl daemon-reload 7. 尝试启动MySQL服务: - 在CentOS上:sudo systemctl start mysql - 在Ubuntu上:sudo systemctl start mysql 8. 使用以下命令检查MySQL服务的状态: - 在CentOS上:sudo systemctl status mysql - 在Ubuntu上:sudo systemctl status mysql 如果上述解决方案不能解决问题,请提供更多关于您的操作系统和MySQL安装的详细信息,以便我们提供更准确的帮助。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值