Centos7 完全断网离线环境安装MySQL 8.0.33 图文教程
- 1.1前言
- 1.2 下载离线安装包
- 1.3 将下载好的离线安装包上传到Centos 7 服务器
- 1.3.1 方式一:联网环境下可利用rz命令进行文件上传
- 1.3.2 方式二:断网环境下使用 XFtp 等软件工具进行上传
- 1.4 解压安装包
- 1.5 执行安装脚本
- 1.6 重置root账号默认密码
- 1.6 修改默认登录密码以及允许远程 ip连接
- 1.6.1 切换数据库
- 1.6.2 取消安全模式
- 1.6.3 Mysql默认不允许远程登录,需要开启远程访问权限
- 1.6.4 修改数据库 root账号默认登录密码
- 1.6.5 刷新策略,使其立即生效
1.1前言
这篇博文分享如何在 Centos7 完全断网离线环境下安装MySQL 8.0.33 图文教程。
和外面免费文章不同的是,博主花费十几个小时精心编写了一个sh 脚本,可实现一键安装配置。
1.2 下载离线安装包
- 打开下载首页,https://downloads.mysql.com/archives/community/
- 由于是 centos7 系统,因此不许按照下图所示,选择相关配置
检索下面这个关键词:
Red Hat Enterprise Linux 7 / Oracle Linux 7 (x86, 64-bit), Compressed TAR Archive
- 由于 Centos 7 是由 Read Hat 的开源版本,因此应该下载下面这个归档压缩包而不是 rpm 压缩包也不是Linux-Generic.
- 如果选择使用Linux - Generic
- 则会最后执行时报错如下:
/usr/local/applications/mysql/mysql-8.0.33/bin/mysqld /usr/local/applications/mysql/mysql-8.0.33/bin/mysqld: /lib64/libstdc++.so.6: version `CXXABI_1.3.11' not found (required by /usr/local/applications/mysql/mysql-8.0.33/bin/mysqld) /usr/local/applications/mysql/mysql-8.0.33/bin/mysqld: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/local/applications/mysql/mysql-8.0.33/bin/mysqld) /usr/local/applications/mysql/mysql-8.0.33/bin/mysqld: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /usr/local/applications/mysql/mysql-8.0.33/bin/mysqld) /usr/local/applications/mysql/mysql-8.0.33/bin/mysqld: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /usr/local/applications/mysql/mysql-8.0.33/bin/mysqld) /usr/local/applications/mysql/mysql-8.0.33/bin/mysqld: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/local/applications/mysql/mysql-8.0.33/bin/mysqld) /usr/local/applications/mysql/mysql-8.0.33/bin/mysqld: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/local/applications/mysql/mysql-8.0.33/bin/mysqld) /usr/local/applications/mysql/mysql-8.0.33/bin/mysqld: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /usr/local/applications/mysql/mysql-8.0.33/bin/mysqld) /usr/local/applications/mysql/mysql-8.0.33/bin/mysqld: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by /usr/local/applications/mysql/mysql-8.0.33/bin/../lib/private/libcrypto.so.1.1) /usr/local/applications/mysql/mysql-8.0.33/bin/mysqld: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /usr/local/applications/mysql/mysql-8.0.33/bin/../lib/private/libprotobuf-lite.so.3.19.4) /usr/local/applications/mysql/mysql-8.0.33/bin/mysqld: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /usr/local/applications/mysql/mysql-8.0.33/bin/../lib/private/libprotobuf-lite.so.3.19.4) /usr/local/applications/mysql/mysql-8.0.33/bin/mysqld: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/local/applications/mysql/mysql-8.0.33/bin/../lib/private/libprotobuf-lite.so.3.19.4) /usr/local/applications/mysql/mysql-8.0.33/bin/mysqld: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/local/applications/mysql/mysql-8.0.33/bin/../lib/private/libprotobuf-lite.so.3.19.4) /usr/local/applications/mysql/mysql-8.0.33/bin/mysqld: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/local/applications/mysql/mysql-8.0.33/bin/../lib/private/libprotobuf-lite.so.3.19.4)linux-vdso.so.1 => (0x00007ffc6ffc1000)libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fde69dcd000)libcrypto.so.1.1 => /usr/local/applications/mysql/mysql-8.0.33/bin/../lib/private/libcrypto.so.1.1 (0x00007fde6