Linux系统MySQL初始化后运行报错

问题过程:

初始化数据库:
./mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
运行该命令后若出现的报错如下(阿里云CentOS7):

error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

出现该问题首先检查该链接库文件有没有安装使用 命令进行核查

   rpm -qa|grep libaio   

运行该命令后发现系统中无该链接库文件

使用命令,yum install  libaio-devel.x86_64

安装成功后,继续运行数据库的初始化命令,提示成功。
安全启动:
./mysqld_safe --user=mysql &
但是报错:

does not exist or is not executable. Please cd to the mysql installation
directory and restart this script from there as follows:
./bin/mysqld_safe&
See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information

解决办法:

在MySQL 5.7中,安全性提升,要求切换到安装目录,来启动数据库:
例如安装目录为 /usr/local/mysql/mysql-5.7.17,那么就重新运行启动命令:
bin/mysqld_safe --user=mysql &

成功解决截图:

在这里插入图片描述
感谢博主提供资料:
https://blog.csdn.net/wlphyl/article/details/88664654
http://blog.itpub.net/26506993/viewspace-2136837/

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值