• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

Linux下MySQL离线安装

武飞扬头像
@roc
帮助1

相关安装包下载

链接:https://pan.百度.com/s/1RuOtncFkBOPNrcBGRxaIJg?pwd=1h8h
提取码:1h8h

1、安装前准备

1.1检查是否已安装

rpm -qa |grep  mysql                    #检查是否已安装
rpm -qa |grep  mariadb                  #系统默认自带

1.2清理mariadb

rpm -e mariadb-libs-5.5.68-1.el7.x86_64
报依赖错误则使用以下命令
yum remove  mariadb-libs-5.5.68-1.el7.x86_64

2、安装依赖

yum install libaio                #需安装
yum install perl                  #一般已安装
yum install net-tools             #一般已安装

3、修改操作系统限制

cat <<'EOF'>> /etc/security/limits.conf
*  soft  nproc 65536
*  hard  nproc 65536
*  soft  nofile 65536
*  hard  nofile 65536
EOF

4、解压并安装

tar -xzvf mysql-8.0.25-1.el7.x86_64.rpm-bundle.tar

进入mysql解压后的目录

rpm -ivh mysql-community* --force --nodeps

5、查看安装状态并启动

systemctl status mysqld
systemctl start mysqld

6、查看临时密码

grep password /var/log/mysqld.log        #查看临时密码

7、登入数据库并修改密码

学新通
修改密码

alter user 'root'@'localhost' identified by 'password';        #不能太简单

8、授权远程连接

use mysql;
select host, user, authentication_string, plugin from user;               #查看当前信息
update user set host='%' where user='root';                               #更改root的host为%
select host, user, authentication_string, plugin from user;
flush privileges; 

9、Navicat连接测试

关闭linux防火墙或添加防火墙策略,使用navicat进行连接测试,如果远程连接报错如下
Error: 1251
Message: Client does not support authentication protocol requested by server; consider upgrading MySQL client
进入数据库运行以下命令

ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'password';

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhggggfh
系列文章
更多 icon
同类精品
更多 icon
继续加载