iis服务器助手广告广告
返回顶部
首页 > 资讯 > 数据库 >在 centos 上安装配置 MySQL8.0 教程
  • 687
分享到

在 centos 上安装配置 MySQL8.0 教程

centosmysql数据库 2023-08-17 14:08:48 687人浏览 薄情痞子
摘要

在 Centos7 上安装配置 Mysql8.0 教程 在 Centos 环境上的安装配置安装配置连接 在 Centos 环境上的安装配置 安装环境为:在 win11系统 -> virtualbox 虚拟机 -> cento

在 Centos 环境上的安装配置

安装环境为:在 win11系统 -> virtualbox 虚拟机 -> centos7.9 系统 -> mysql8.0
测试时间为:2023 年 05 月

安装

  1. 确定所要下载的版本:
$ uname -m# 输出 x86_64$ cat /etc/redhat-release# 输出 CentOS linux release 7.9.2009 (Core)
  1. 下载对应版本的 rpm 文件资源 Download MySQL Yum Repository

对应文件为:Red Hat Enterprise Linux 7 / oracle Linux 7 (Architecture Independent)

点击:浏览器 ->下载 -> 右键复制文件下载链接,安装 yum 资源:

下载链接为:https://repo.mysql.com//mysql80-commUnity-release-el7-7.noarch.rpm

$ rpm -ivh Https://repo.mysql.com//mysql80-community-release-el7-7.noarch.rpm
  1. 查看 MySQL 当前版本:
$ yum info mysql-community-server# 8.0.33
  1. 安装 MySQL:
$ yum -y install mysql-community-server

安装完成!

配置

  1. 启动 MySQL 服务:
$ systemctl start mysqld.service
  1. 查看 MySQL 运行状态:
$ systemctl status mysqld.service
  1. 获取 root 用户的密码:
$ grep "passWord" /var/log/mysqld.log
2023-05-10T01:41:41.632792Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: _ih4M9ogiXt%# 其中最后的 _ih4M9ogiXt% 就是密码
  1. 进入数据库
$ mysql -u root -p# 初始密码为之前获取的 _ih4M9ogiXt%
  1. 修改新的密码:
# 密码设置必须要大小写字母数字和特殊符号$ ALTER USER 'root'@'localhost' IDENTIFIED BY 'new password';
  1. 重新进入数据库
$ mysql -u root -p# 使用修改过后的密码
Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 10Server version: 8.0.33 MySQL Community Server - GPLCopyright (c) 2000, 2023, Oracle and/or its affiliates.Oracle is a reGIStered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

配置完成!

连接

所使用的数据库管理软件为 Datagrip,亲测十分好用。

  1. 打开软件,调出配置界面:
    在这里插入图片描述
  2. 先配置 ssh 连接:
    在这里插入图片描述
    在这里插入图片描述
  3. 再进行常规连接:
    在这里插入图片描述
  4. 调出所有数据库,创建会话:
    在这里插入图片描述
    在这里插入图片描述
    连接完成!

来源地址:https://blog.csdn.net/qq_39547794/article/details/130560898

您可能感兴趣的文档:

--结束END--

本文标题: 在 centos 上安装配置 MySQL8.0 教程

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

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

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • oracle怎么显示表的字段
    如何显示 oracle 表的字段 在 Oracle 数据库中,可以使用 DESC 命令显示表的字段。 语法: DESC table_name 参数: table_name:要显示字段的表...
    99+
    2024-05-14
    oracle
  • oracle怎么看所有的表
    在 oracle 数据库中查看所有表的步骤:连接到数据库运行查询:select table_name from user_tables; 如何使用 Oracle 查看所有表 ...
    99+
    2024-05-14
    oracle
  • oracle怎么显示行数
    如何使用 oracle 显示行数 在 Oracle 数据库中,有两种主要方法可以显示行数: 1. 使用 COUNT 函数 SELECT COUNT(*) FROM table_n...
    99+
    2024-05-14
    oracle
  • oracle怎么显示百分比
    oracle中显示百分比的方法有:使用百分号“%”;使用to_char()函数;使用format()函数(oracle 18c及更高版本);创建自定义函数。 Oracle 显...
    99+
    2024-05-14
    oracle
  • oracle怎么删除列
    oracle 中删除列的方法有两种:1)使用 alter table table_name drop column column_name 语句;2)使用 drop colum...
    99+
    2024-05-14
    oracle
  • sql怎么查看表的索引
    通过查询系统表,可以获取表的索引信息,包括索引名称、是否唯一、索引类型、索引列和行数。常用系统表有:mysql 的 information_schema.statistics、postg...
    99+
    2024-05-14
    mysql oracle
  • sql怎么查看索引
    您可以使用 sql 通过以下方法查看索引:show indexes 语句:显示表中定义的索引列表及其信息。explain 语句:显示查询计划,其中包含用于执行查询的索引。informat...
    99+
    2024-05-14
  • sql怎么查看存储过程
    如何查看 sql 存储过程的源代码:使用 show create procedure 语句直接获取创建脚本。查询 information_schema.routines 表的 routi...
    99+
    2024-05-14
  • sql怎么查看视图表
    要查看视图表,可以使用以下步骤:使用 select 语句获取视图中的数据。使用 desc 语句查看视图的架构。使用 explain 语句分析视图的执行计划。使用 dbms 提供...
    99+
    2024-05-14
    oracle python
  • sql怎么查看创建的视图
    可以通过sql查询查看已创建的视图,具体步骤包括:连接到数据库并执行查询select * from information_schema.views;查询结果将显示视图的名称、...
    99+
    2024-05-14
    mysql
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作