返回顶部
首页 > 资讯 > 数据库 >Linux下MySQL离线安装
  • 379
分享到

Linux下MySQL离线安装

mysqllinux数据库 2023-08-31 20:08:36 379人浏览 薄情痞子
摘要

Mysql安装 相关安装包下载1、安装前准备1.1检查是否已安装1.2清理mariadb 2、安装依赖3、修改操作系统限制4、解压并安装5、查看安装状态并启动6、查看临时密码7、登入数据

Mysql安装

相关安装包下载

链接:https://pan.baidu.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 65536EOF

4、解压并安装

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

进入mysql解压后的目录

rpm -ivh mysql-commUnity* --force --nodeps

5、查看安装状态并启动

systemctl status mysqldsystemctl 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';

来源地址:https://blog.csdn.net/weixin_53893423/article/details/130707148

您可能感兴趣的文档:

--结束END--

本文标题: Linux下MySQL离线安装

本文链接: https://www.lsjlt.com/news/387043.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作