首页 > 数据库 >部署堡垒机2——安装MySQL8.0.32或8.0.28+

部署堡垒机2——安装MySQL8.0.32或8.0.28+

时间:2023-02-21 20:12:03浏览次数:56  
标签:8.0 32 mysql 28 yum MySQL mysqld root

MySQL的三大版本

a)MySQL Enterprise Edition:企业版本(付费)
b)MySQL Cluster CGE:高级集群版(收费)
c)MySQL Community Server:社区版(开源)

 

登录MySQL官网

https://www.mysql.com/downloads/

点击“DOCUMENTATION”——“MySQL Server”——“Installing and Upgrading MySQL”——“Installing MySQL on Linux

点击:Installing MySQL on Linux Using the MySQL Yum Repository

点击:https://dev.mysql.com/downloads/repo/yum/

点击linux 7——download

右键复制链接地址

wget https://dev.mysql.com/get/mysql80-community-release-el7-7.noarch.rpm

操作步骤如下:

cd /opt/
wget https://dev.mysql.com/get/mysql80-community-release-el7-7.noarch.rpm
yum install mysql80-community-release-el7-7.noarch.rpm
gcc -v
yum update
yum list | grep mysql
yum install mysql-community-server


root@jumpserver-app-t01:/opt#mysql -V
mysql  Ver 8.0.32 for Linux on x86_64 (MySQL Community Server - GPL)

启动mysqld服务

root@jumpserver-app-t01:/opt/mysql#systemctl start mysqld
root@jumpserver-app-t01:/opt/mysql#systemctl status mysqld
root@jumpserver-app-t01:/opt/mysql#systemctl enable mysqld
root@jumpserver-app-t01:/opt/mysql#

找到mysql的默认密码在这里:root@localhost: si<%<s%x7.On

root@jumpserver-app-t01:/var/log#cat /var/log/mysqld.log
2023-02-21T11:06:14.287837Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.32) initializing of server in progress as process 90720
2023-02-21T11:06:14.296083Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-02-21T11:06:14.658319Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-02-21T11:06:15.848026Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: si<%<s%x7.On
2023-02-21T11:06:18.815307Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.32) starting as process 90787
2023-02-21T11:06:18.821989Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-02-21T11:06:18.911013Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-02-21T11:06:19.119711Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2023-02-21T11:06:19.119756Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2023-02-21T11:06:19.136298Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2023-02-21T11:06:19.136335Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.32'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server - GPL.
root@jumpserver-app-t01:/var/log#

此时需要到mysql中使用临时密码登录,并修改临时密码,因为临时密码是不可用的

mysql -uroot -p
si<%<s%x7.On

mysql> alter user root@'localhost' identified by'*******@666';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;    #刷新数据表信息后exit退出
Query OK, 0 rows affected (0.00 sec)
mysql>exit
Bye

简单方法,去阿里源中找到mysql-community-server-8.0.28-1.el7.x86_64.rpm,下载到本地后,然后yum localinstall ./*

这样既能安装该组件,还能安装所需依赖

cd /opt
mkdir mysql
cd mysql
wget https://mirrors.aliyun.com/mysql/MySQL-8.0/mysql-community-server-8.0.28-1.el7.x86_64.rpm?spm=a2c6h.25603864.0.0.5e8670b2c1XZn4
yum localinstall ./*

后面一路选Y安装即可

 

标签:8.0,32,mysql,28,yum,MySQL,mysqld,root
From: https://www.cnblogs.com/Magiclala/p/17142243.html

相关文章

  • POJ 2228 Naptime 环形DP
    先不考虑环的情况dp[i][j][0]:前i个时间间隔中,已经花费了j个间隔,取得的最大值,并且第i个间隔在休息dp[i][j][1]:前i个时间间隔中,已经花费了j个间隔,取得的最大值,并且第i个间......
  • CentOS7 安装MySQL 8.0.28+
     MySQL的三大版本a)MySQLEnterpriseEdition:企业版本(付费)b)MySQLClusterCGE:高级集群版(收费)c)MySQLCommunityServer:社区版(开源) 登录MySQL官网https://www.mysql.com......
  • 为什么使用数据库、数据库的常用概念DB DBMS SQL、常见的数据库排名、Mysql的安装与卸
    为什么使用数据库使用数据库主要原因有两点:为了方便我们长久的存储数据可以很方便的帮我们管理,查询数据库中的数据!可以存储各种各样的数据类型,比如:字符串、数字、文件......
  • leetcode 28. 实现strStr()
    库函数#include<iostream>#include<string>usingnamespacestd;#definedebug(x)cout<<#x<<":"<<x<<endl;classSolution{public:intstrStr(stringh......
  • NRF52840-QIAA-R Nordic BLE5.0蓝牙无线收发芯片
    nRF52840相对于nRF52832具有更大的flash及ram,片内集成1MBflash,256kBRAM。支持蓝牙5.0,802.15.4,ANT及2.4GHz私有协议,同时与nRF51及nRF24系列兼容。nRF52840供电范围为1.7V......
  • 1329 - 求梯形的面积
       ......
  • windows 安装 mysql-8.0.32 压缩包方式
    下载地址https://dev.mysql.com/downloads/mysql/5.0.html解压把解压好的文件夹放到D盘(注意所有路径中都不要包含中文路径)D:\mysql-8.0.32-winx64创建一个空文......
  • Solidity8.0-01
    对应崔棉大师1-25课程https://www.bilibili.com/video/BV1yS4y1N7yu/?spm_id_from=333.788&vd_source=c81b130b6f8bb3082bdb42226729d69csolidity8.0新特性1.安全数学 u......
  • mysql8.0的可用方案
    1.在/use/local下创建mysql文件夹mkdirmysql2.切换到mysql文件夹下cdmysql3.下载mysqlwgethttps://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.20-linux-......
  • [LeetCode] 1326. Minimum Number of Taps to Open to Water a Garden
    Thereisaone-dimensionalgardenonthex-axis.Thegardenstartsatthepoint 0 andendsatthepoint n.(i.eThelengthofthegardenis n).Thereare ......