linux安装mysql启动失败的问题及解决方案

在Linux系统中安装MySQL后,启动时遇到问题。本文详细记录了启动失败的错误报告,分析了可能的原因,包括权限问题、安全配置和线程问题。并提供了相应的解决步骤,如修改权限设置、检查配置文件以及执行特定的命令来修复问题,确保MySQL能够成功启动并正常运行。

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

 

问题如下
Preparing...                ########################################### [100%]
   1:MySQL-server           ########################################### [100%]
050929 23:39:47 [Warning] Asked for 196608 thread stack, but got 126976
050929 23:39:47 [Warning] Asked for 196608 thread stack, but got 126976
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h yiju password 'new-password'
See the manual for more instructions.

NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com
Starting MySQL...................................[FAILED]
问题分析:
这个问题是由selinux引起。ELinux全称是Security Enhanced Linux,由美国国家安全部(National Security Agency)领导开发的GPL项目,它拥有一个灵活而强制性的访问控制结构,旨在提高Linux系统的安全性,提供强健的安全保证,可防御未知攻击,据称相当于B1级的军事安全性能。比MS NT所谓的C2等高得多。
应用SELinux后,可以减轻恶意攻击或恶意软件带来的灾难,并提供对机密性和完整性有很高要求的信息很高的安全保障。在网络中的服务器,建议开启SELinx,以提高系统的安全性。
解决方案:

用命令# sestatus 查看查看当前SELinux的运行状态,如果是enforcing,使用命令setsebool设置SELinux为disabled。例下

 

[root@localhost ~]# sestatus SELinux status: enforcing

 

 

[root@localhost ~]# vi /etc/sysconfig/selinux 
SELINUX=enforcing --> SELINUX=disabled

 

重启后生效

 

不需重启

执行命令:setenforce 0

 

 

 

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值