linux安装mysql时候报错解决方案

安装教程:https://www.jianshu.com/p/d49bd39e23a3

 

1、执行命令:mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backu
     报错:mv: cannot stat ‘/etc/yum.repos.d/CentOS-Base.repo’: No such file or directory

     解决方案:http://mirrors.163.com/.help/centos.html

     说明:将备份好CentOS-Base.repo(没有该文件网上下载一份放入到该文件夹下面)

      执行命令:mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

           下载对应版本repo文件, 放入/etc/yum.repos.d/(操作前请做好相应备份既是上一步的操作执行命令)

            按照如下步骤生成缓存(1、yum clean all    ;2、yum makecache  )

            注:yum 不能安装应用查看本文章的第二点

 

2、执行yum 不能安装应用,

     提示There are no enabled repos Run "yum repolist all"

     解决方案:

 

 

3、执行命令:./scripts/mysql_install_db --user=mysql
     报如下错误:

sh: ./bin/my_print_defaults: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory  
    FATAL ERROR: Neither host 'ize0bao3ojq3h2z' nor 'localhost' could be looked up with
./bin/resolveip
Please configure the 'hostname' command to return a correct
hostname.
If you want to solve this at a later stage, restart this script
with the --force option

     解决方案: 

 

 

4、执行命令:./scripts/mysql_install_db --user=mysql
     报如下错误:

WARNING: The host 'ize0bao3ojq3h2z' could not be looked up with ./bin/resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !

     解决方案: https://blog.51cto.com/00127129/1679241
     编辑hosts文件:vim /etc/hosts

     添加如下命令: 当前主机的IP地址 + 当前的机器名 (例如:120.88.78.186 localhost)

 

5、

6、

  • 2
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值