mysql 的rpm安装错误
-
1. 安装软件前,检查是否已经安装 rpm -qa | grep mysql 2. 存在,强制卸载 sudo rpm -e mysql-libs-5.1.71-1.el6.x86_64 --nodeps 3. 安装mysql-server 4. sudo rpm -ivh mysql-community-server-5.7.21-1.el6.x86_64.rpm [--test] 提示信息:说明依赖于下面的几个软件包 error: Failed dependencies: mysql-community-client(x86-64) >= 5.7.9 is needed by mysql-community-server-5.7.21-1.el6.x86_64 mysql-community-common(x86-64) = 5.7.21-1.el6 is needed by mysql-community-server-5.7.21-1.el6.x86_64 5. 先安装mysql-client sudo rpm -ivh mysql-community-client-5.7.21-1.el6.x86_64.rpm error: Failed dependencies: mysql-community-libs(x86-64) >= 5.7.9 is needed by mysql-community-client-5.7.21-1.el6.x86_64 6. 再安装mysql -libs sudo rpm -ivh mysql-community-libs-5.7.21-1.el6.x86_64.rpm error: Failed dependencies: mysql-communityc(x86-64) >= 5.7.9 is needed by mysql-community-libs-5.7.21-1.el6.x86_64 7. 安装mysql-common sudo rpm -ivh mysql-community-common-5.7.21-1.el6.x86_64.rpm !!!!!终于成功了 8. 安装mysql -libs sudo rpm -ivh mysql-community-libs-5.7.21-1.el6.x86_64.rpm 9. 安装client sudo rpm -ivh mysql-community-client-5.7.21-1.el6.x86_64.rpm warning: mysql-community-server-5.7.21-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY error: Failed dependencies: /usr/bin/perl is needed by mysql-community-server-5.7.21-1.el6.x86_64 libaio.so.1()(64bit) is needed by mysql-community-server-5.7.21-1.el6.x86_64 libaio.so.1(LIBAIO_0.1)(64bit) is needed by mysql-community-server-5.7.21-1.el6.x86_64 libaio.so.1(LIBAIO_0.4)(64bit) is needed by mysql-community-server-5.7.21-1.el6.x86_64 libnuma.so.1()(64bit) is needed by mysql-community-server-5.7.21-1.el6.x86_64 libnuma.so.1(libnuma_1.1)(64bit) is needed by mysql-community-server-5.7.21-1.el6.x86_64 libnuma.so.1(libnuma_1.2)(64bit) is needed by mysql-community-server-5.7.21-1.el6.x86_64 perl(File::Path) is needed by mysql-community-server-5.7.21-1.el6.x86_64 perl(Getopt::Long) is needed by mysql-community-server-5.7.21-1.el6.x86_64 perl(POSIX) is needed by mysql-community-server-5.7.21-1.el6.x86_64 perl(strict) is needed by mysql-community-server-5.7.21-1.el6.x86_64 //这个错误是缺少libaio,perl依赖可以通过yum 安装 //libnuma这个依赖不能直接通过yum安装 可以通过yum安装numactl-devel.x86_64 10. 安装server sudo rpm -ivh mysql-community-server-5.7.21-1.el6.x86_64.rpm 11. 检查服务 service mysqld status 12. 开启服务 service mysqld start 13. 查看初始密码: cat /var/log/mysqld.log | grep password 14. 连接 mysql -u root -p enter password: 输入时是隐藏效果 15. 修改密码 alter user root@localhost identified by 'newPwd'; set password for root@localhost=password('newPwd');