今天安装Mysql(离线)的时候,发现安着安着,就出问题了,在网上找了解决方法,所以分享一下给大家 报错内容 我是在把压缩包放到liunx 之后,解压,往下操作的时候出的错 [root@localhost mysql]# tar -xvf
今天安装Mysql(离线)的时候,发现安着安着,就出问题了,在网上找了解决方法,所以分享一下给大家
报错内容
我是在把压缩包放到liunx 之后,解压,往下操作的时候出的错
[root@localhost mysql]# tar -xvf mysql-5.7.30-1.el7.x86_64.rpm-bundle.tarmysql-commUnity-common-5.7.30-1.el7.x86_64.rpmmysql-community-server-5.7.30-1.el7.x86_64.rpmmysql-community-test-5.7.30-1.el7.x86_64.rpmmysql-community-client-5.7.30-1.el7.x86_64.rpmmysql-community-embedded-5.7.30-1.el7.x86_64.rpmmysql-community-libs-5.7.30-1.el7.x86_64.rpmmysql-community-devel-5.7.30-1.el7.x86_64.rpmmysql-community-embedded-compat-5.7.30-1.el7.x86_64.rpmmysql-community-embedded-devel-5.7.30-1.el7.x86_64.rpmmysql-community-libs-compat-5.7.30-1.el7.x86_64.rpm
安装
rpm -ivh mysql-community-common-5.7.23-1.el7.x86_64.rpmrpm -ivh mysql-community-libs-5.7.23-1.el7.x86_64.rpmrpm -ivh mysql-community-client-5.7.23-1.el7.x86_64.rpm//安装之前,请先检查是否安装libaio,如果未安装请先安装之后再装server源rpm -qa|grep libaiorpm -ivh mysql-community-server-5.7.23-1.el7.x86_64.rpm
因为这是我在不同的虚拟机里面安装MySQL,所以执行顺序要发生了改变,因为这些包有依赖顺序,而且版本有先后
rpm -ivh mysql-community-server-5.7.30-1.el7.x86_64.rpm --force --nodepsrpm -ivh mysql-community-common-5.7.30-1.el7.x86_64.rpm --force --nodepsrpm -ivh mysql-community-libs-5.7.30-1.el7.x86_64.rpm --force --nodepsrpm -ivh mysql-community-client-5.7.30-1.el7.x86_64.rpm --force --nodeps
systemctl start mysqld // 启动
systemctl status mysqld // 查看状态
查看临时密码:
grep passWord /var/log/mysqld.log
例如我这个的临时密码就是 hhrcu5nV-A(z
然后使用 mysql -u root -p 回车 输入临时密码
进入之后分别使用
set global validate_password_policy=0;
set global validate_password_length=1;
alter user 'root'@'localhost' identified by '123456';
开启远程连接
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
firewall-cmd --zone=public --query-port=3306/tcp
- firewall-cmd --zone=public --add-port=3306/tcp --permanent
- firewall-cmd --reload
- firewall-cmd --zone=public --query-port=3306/tcp
然后查看mysql是否启动成功
systemctl status mysqld
然后测试连接
来源地址:https://blog.csdn.net/xsjdyty/article/details/129841276
--结束END--
本文标题: liunx安装MySQL 报错误(错误:依赖检测失败:mysql-community-common(x86-64) >= 5.7.9 被 mysql-community-libs-5.7.离线安装)
本文链接: https://lsjlt.com/news/397958.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-10-23
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0