Centos7—2003下安装mysql8.0.28详细教程

2023-05-16

首先使用xftp上传mysql的linux压缩包

然后使用解压命令tar -xvf mysql-8.0.28-1.el7.x86_64.rpm-bundle.tar

具体步骤如下  严格按照安装顺序安装 切记切记

[root@localhost ~]# tar -xvf mysql-8.0.28-1.el7.x86_64.rpm-bundle.tar
mysql-community-client-8.0.28-1.el7.x86_64.rpm
mysql-community-client-plugins-8.0.28-1.el7.x86_64.rpm
mysql-community-common-8.0.28-1.el7.x86_64.rpm
mysql-community-devel-8.0.28-1.el7.x86_64.rpm
mysql-community-embedded-compat-8.0.28-1.el7.x86_64.rpm
mysql-community-icu-data-files-8.0.28-1.el7.x86_64.rpm
mysql-community-libs-8.0.28-1.el7.x86_64.rpm
mysql-community-libs-compat-8.0.28-1.el7.x86_64.rpm
mysql-community-server-8.0.28-1.el7.x86_64.rpm
mysql-community-test-8.0.28-1.el7.x86_64.rpm
[root@localhost ~]# ll
总用量 1701628
drwxr-xr-x. 2 root root          6 7月   5 09:50 aaa
-rw-r--r--. 1 root root        137 7月   5 14:19 after.tar.gz
-rw-------. 1 root root       1701 11月 19 2021 anaconda-ks.cfg
drwxr--r--. 2 root root         99 7月   5 19:19 demo
-rw-r--r--. 1 root root         76 7月   5 14:10 demo.txt
drwxr-xr-x. 2 root root          6 7月   4 14:42 Desktop
drwxr-xr-x. 2 root root          6 7月   4 14:42 Documents
drwxr-xr-x. 2 root root          6 7月   5 19:31 Downloads
-rw-r--r--. 1 root root       1732 11月 19 2021 initial-setup-ks.cfg
-rw-r--r--. 1 root root          0 7月   5 15:42 lesson.sh
drwxr-xr-x. 2 root root          6 7月   4 14:42 Music
-rw-r--r--. 1 root root  843008000 7月   5 19:52 mysql-8.0.28-1.el7.x86_64.rpm-bundle.tar
-rw-r--r--. 1 7155 31415  55199948 12月 18 2021 mysql-community-client-8.0.28-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415   5933684 12月 18 2021 mysql-community-client-plugins-8.0.28-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415    645388 12月 18 2021 mysql-community-common-8.0.28-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415   7763684 12月 18 2021 mysql-community-devel-8.0.28-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415  23637584 12月 18 2021 mysql-community-embedded-compat-8.0.28-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415   2215928 12月 18 2021 mysql-community-icu-data-files-8.0.28-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415   4935572 12月 18 2021 mysql-community-libs-8.0.28-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415   1265072 12月 18 2021 mysql-community-libs-compat-8.0.28-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 473116268 12月 18 2021 mysql-community-server-8.0.28-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 268279684 12月 18 2021 mysql-community-test-8.0.28-1.el7.x86_64.rpm
-rw-r--r--. 1 root root         26 7月   5 14:10 my.txt
drwxr-xr-x. 2 root root          6 7月   4 14:42 Pictures
drwxr-xr-x. 2 root root          6 7月   4 14:42 Public
drwxr-xr-x. 3 root root         31 7月   5 14:28 ss
drwxr-xr-x. 2 root root          6 7月   4 14:42 Templates
drwxr-xr-x. 3 root root         71 7月   5 14:15 test
drwxr-xr-x. 2 root root          6 7月   4 14:42 Videos
-r--r--r--. 1 root root   56431201 11月 19 2021 VMwareTools-10.3.10-13959562.tar.gz
[root@localhost ~]# rpm -qa|grep mariadb
mariadb-libs-5.5.65-1.el7.x86_64
[root@localhost ~]# rpm -e --nodes mariadb-libs
rpm: --nodes: 未知的选项
[root@localhost ~]# rpm -e --nodeps mariadb-libs
[root@localhost ~]# rpm -qa|grep mariadb
[root@localhost ~]# rpm -ivh mysql-community-common-8.0.28-1.el7.x86_64.rpm
警告:mysql-community-common-8.0.28-1.el7.x86_64.rpm: 头V4 RSA/SHA256 Signature, 密钥 ID 3a79bd29: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:mysql-community-common-8.0.28-1.e################################# [100%]
[root@localhost ~]# rpm -ivh mysql-community-client-plugins-8.0.28-1.el7.x86_64.rpm
警告:mysql-community-client-plugins-8.0.28-1.el7.x86_64.rpm: 头V4 RSA/SHA256 Signature, 密钥 ID 3a79bd29: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:mysql-community-client-plugins-8.################################# [100%]
[root@localhost ~]# rpm -ivh mysql-community-libs-8.0.28-1.el7.x86_64.rpm
警告:mysql-community-libs-8.0.28-1.el7.x86_64.rpm: 头V4 RSA/SHA256 Signature, 密钥 ID 3a79bd29: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:mysql-community-libs-8.0.28-1.el7################################# [100%]
[root@localhost ~]# rpm -ivh mysql-community-client-8.0.28-1.el7.x86_64.rpm
警告:mysql-community-client-8.0.28-1.el7.x86_64.rpm: 头V4 RSA/SHA256 Signature, 密钥 ID 3a79bd29: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:mysql-community-client-8.0.28-1.e################################# [100%]
[root@localhost ~]# rpm -ivh mysql-community-icu-data-files-8.0.28-1.el7.x86_64.rpm
警告:mysql-community-icu-data-files-8.0.28-1.el7.x86_64.rpm: 头V4 RSA/SHA256 Signature, 密钥 ID 3a79bd29: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:mysql-community-icu-data-files-8.################################# [100%]
[root@localhost ~]# mysql-community-server-8.0.28-1.el7.x86_64.rpm
bash: mysql-community-server-8.0.28-1.el7.x86_64.rpm: 未找到命令...
[root@localhost ~]# rpm -ivh mysql-community-server-8.0.28-1.el7.x86_64.rpm
警告:mysql-community-server-8.0.28-1.el7.x86_64.rpm: 头V4 RSA/SHA256 Signature, 密钥 ID 3a79bd29: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:mysql-community-server-8.0.28-1.e################################# [100%]
[root@localhost ~]# mysqld --initialize --console
[root@localhost ~]# chown -R mysql:mysql /var/lib/mysql/
[root@localhost ~]# systemctl start mysqld
[root@localhost ~]# cat /var/log/mysqld.log|grep localhost
2022-07-05T12:16:17.447203Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: 7viCSry?!5JP
[root@localhost ~]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.28

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> alter user 'root'@'localhost' identified by '123456';
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye
[root@localhost ~]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.28 MySQL Community Server - GPL

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> exit
Bye
[root@localhost ~]# 
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.00 sec)

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Centos7—2003下安装mysql8.0.28详细教程 的相关文章

随机推荐

  • CentOS8.4 OpenLDAP服务配置

    目录 OpenLDAP简介 基本操作 配置文件 服务端配置 配置下载证书 生成数据库并设置权限 调用模块 定义访问和认证信息 定义目录结构 配置用户认证结构 测试 NFS服务配置 客户端配置 测试 挂载用户目录 相关知识 注意事项 环境 服
  • C语言排序算法之选择排序

    文章目录 一 选择排序的概述二 选择排序算法代码详解 xff08 1 xff09 算法分析 xff08 2 xff09 选择排序算法代码详解 三 总代码 一 选择排序的概述 选择排序 xff08 Selection sort xff09 是
  • CodeForces - 501B Misha and Changing Handles(Map)

    题目大意 xff1a 就是讲在codeforces网站上 xff0c 由于一个黑客 xff0c 大家都可以随便改名字了 xff0c 有的人就改了一次又一次 xff0c xff08 当然也有的人就只改一次 xff09 然后题目问你一共有多少个
  • LINUX文件编程之——open(文件打开及创建)

    文件的打开及创建 C语言打开及创建文件需要用到open 函数 xff0c open函数在三个头文件当中 xff1a open函数 函数原型 xff1a open函数的返回值是一个小的 非负整数 xff0c 这个整数是被open打开的文件描述
  • linux文件编程之——write、read、lseek、close(文件的写、读、光标移动,关闭操作)

    文件的写入 xff08 write xff09 昨天已经学习了文件的打开及创建 xff0c 及使用open函数 xff0c 传递不同的参数可以实现文件的打开及创建 xff0c 并赋予文件的权限 xff0c 今天延续昨天的学习内容 文件的写入
  • 嵌入式笔试——笔试题目

    单选 xff08 15题 xff09 第一题 栈简介 栈由操作系统 xff08 编译器 xff09 自动分配释放 xff0c 用于存放函数的参数值 局部变量等 xff0c 其操作方式类似于数据结构中的栈 堆简介 堆由开发人员分配和释放 xf
  • ARM———第一天

    1 为什么学习ARM xff1f 嵌入式 xff1a 操作硬件的软件 嵌入式系统分两大类 xff1a 1 应用程序 xff0b 硬件 2 应用程序 xff0b 操作系统 xff0b 硬件 ARM是学习嵌入式的入门 xff0c 也是学习系统移
  • ARM———第二天

    1 什么是汇编指令 汇编指令 xff1a 是机器指令的助记符 xff0c 经过编译后会得到一串01010组成的机器码 xff0c 可以由cpu读取执行 伪指令 xff1a 本质上不是指令 xff0c 只是和指令一起写在代码中 xff0c 是
  • LINUX内核

    Linux内核功能 内存管理 操作系统内核功能管理设备实际的物理内存 xff0c 还可以创建和管理虚拟内存 xff08 Swap xff09 xff1b 通过硬盘的存储空间来创建虚拟内存 xff0c 叫内存交换空间 xff08 Swap s
  • man手册各章节的意义

    man手册分成很多section xff0c 使用man时可以指定不同的section来浏览 xff0c 各个section意义如下 xff1a 1 commands 2 system calls 3 library calls 4 spe
  • Dockerfile

    1 Docker 镜像原理 操作系统组成部分 xff1a 进程调度子系统 进程通信子系统 内存管理子系统 设备管理子系统 文件管理子系统 网络通信子系统 作业控制子系统 Linux 文件系统由 bootfs 和 rootfs 两部分组成 b
  • 一、STM32寄存器点亮LED灯

    目录 一 xff1a 硬件介绍 二 xff1a 三步点亮LED灯 三 xff1a 新建工程 四 xff1a 寄存器程序 1 xff1a 使能GPIOC的时钟 2 配置GPIOC13端口为输出模式 xff08 端口配置寄存器 xff09 3
  • 0、Linux虚拟机打印hello world

    Ctrl 43 Alt 43 T 打开终端 xff0c 输入sudo apt get install vim 下载vim 输入sudo apt get install gcc xff0c 下载gcc 下载完成后输入clear 可以清除终端
  • VS2017提示 LNK1104 无法打开文件 kernel32.lib

    在C盘里搜索kernel32 lib的路径 xff0c 然后添加到项目 gt 属性 gt VC 43 43 目录 gt 库目录里去就好了 但不知道为什么 xff0c x64路径下的kernel32就不行
  • 【智能无线小车系列四】树莓派操作系统安装

    对于第一次接触树莓派的人来说 xff0c 初次点亮树莓派的过程总是最为激动人心的 其实它就跟我们刚刚买回来的电脑一样 xff0c 首先需要做的就是安装操作系统 还记得上操作系统课程的提到 xff0c 操作系统是软件和硬件之间的桥梁 xff0
  • 使用c++实现学生成绩管理系统

    学生成绩管理系统 一 前言二 系统介绍头文件 CStudent h 2 源文件 xff08 实现函数 xff09 3 源文件 xff08 测试函数 xff09 4 运行截图 三 总结 一 前言 学生成绩管理系统的设计 xff0c 可以更好地
  • 魔百盒cm311-1a yst 青龙

    Armbian Debian 清华源 tsinghua source 清华源 deb https mirrors tuna tsinghua edu cn debian buster main contrib non free deb sr
  • 手把手教你安装Python3.x

    目录 普通安装下载安装包安装Python设置Python安装包 其他安装参考资料End 普通安装 下载安装包 打开浏览器 进入 Python 官网网站 xff08 https www python org xff09 xff0c 因为网站在
  • 实验二 单片机汇编语言算法实现(排序控制LED灯亮灭)

    这里写目录标题 实验二 汇编语言算法实现实验一 实验目的二 实验内容三 实验结果 实验二 汇编语言算法实现实验 一 实验目的 xff08 1 xff09 掌握汇编语言工程的编写 xff08 2 xff09 对单片机 I O 接口汇编控制有初
  • Centos7—2003下安装mysql8.0.28详细教程

    首先使用xftp上传mysql的linux压缩包 然后使用解压命令tar xvf mysql 8 0 28 1 el7 x86 64 rpm bundle tar 具体步骤如下 严格按照安装顺序安装 切记切记 root 64 localho