欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

ContOS7 rpm安装mysql时遇到的错误

程序员文章站 2022-07-15 17:05:01
...

1.安装MySQL-server包时报error: Failed dependencies(错误:依赖检测失败:)

[[email protected] mysql]# rpm -ivh MySQL-server-5.6.22-1.el6.i686.rpm
error: Failed dependencies:
.........
dbus-python-1.1.1-9.el7.x86_64
python-firewall-0.6.3-2.el7.noarch
plymouth-core-libs-0.8.9-0.32.20140113.el7.centos.x86_64

解决方法:

[[email protected] mysql]# yum -y install libaio.so.1 libgcc_s.so.1 libstdc++.so.6
[[email protected] mysql]# rpm -ivh MySQL-server-5.6.22-1.el6.i686.rpm

2.安装mysql-client.rpm包时报error: Failed dependencies(错误:依赖检测失败:)

[[email protected] mysql]# rpm -ivh MySQL-client-5.6.22-1.el6.i686.rpm
error: Failed dependencies:
        libncurses.so.5 被 MySQL-client-5.6.22-1.el6.i686 需要
        libtinfo.so.5 被 MySQL-client-5.6.22-1.el6.i686 需要

解决方法: 安装上面提示的依赖包

[[email protected] mysql]# yum -y install libncurses.so.5 libtinfo.so.5

3.service mysql start 启动mysql服务时报错ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid).

解决方案:

初始化数据库报错

[[email protected] ~]# mysql_install_db --user=mysql --ldata=/var/lib/mysql/
FATAL ERROR: please install the following Perl modules before executing /usr/bin/mysql_install_db:

解决上面问题安装autoconf库

[[email protected] ~]# yum -y install autoconf

然后执行初始化成功,并可以直接链接数据库

初始化时的提示

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 localhost.localdomain password 'new-password'

我的还没有找到密码 明天继续!