【银河麒麟V10 SP2 x86安装mysql8.0.29】

目录

前言

一、Mysql是什么?

二、在线安装步骤

1.下载Mysql8.0.29源

2.安装源文件

3.安装Mysql-8.0.29

4.启动Mysql

5.查看默认密码

6.初始化



前言

在关系型数据库当中,mysql由于其特殊性,在众多企业中应用广泛,那么如何在我们国产系统银河麒麟V10 SP2中安装Mysql8.0.29呢

一、Mysql是什么?

MySQL是一个小型关系型数据库管理系统,开发者为瑞典MySQL AB公司。在2008年1月16号被Sun公司收购。而2009年,SUN又被Oracal收购.对于Mysql的前途,没有任何人抱乐观的态度.目前 MySQL被广泛地应用在Internet上的中小型网站中。由于其体积小、速度快、总体拥有成本低,尤其是开放源码这一特点,许多中小型网站为了降低网 站总体拥有成本而选择了MySQL作为网站数据库。
 

二、在线安装步骤

1.下载Mysql8.0.29源

官网地址:MySQL :: Download MySQL Yum Repository

百度网盘链接:链接:https://pan.baidu.com/s/1ixlPhhfeAEuh24K-3Dxtuw?pwd=1234 
提取码:1234 

2.安装源文件

rpm -ivh mysql80-community-release-el8-4.noarch.rpm
卸载mariabdb
rpm -e {mariadb-server,mariadb,mariadb-errmessage,mariadb-common}

3.安装Mysql-8.0.29

[root@localhost mysqlpackage]# yum install mysql-community-server


已安装:
  mysql-community-client-8.0.29-1.el8.x86_64                mysql-community-client-plugins-8.0.29-1.el8.x86_64               
  mysql-community-common-8.0.29-1.el8.x86_64                mysql-community-icu-data-files-8.0.29-1.el8.x86_64               
  mysql-community-libs-8.0.29-1.el8.x86_64                  mysql-community-server-8.0.29-1.el8.x86_64                       

完毕!

4.启动Mysql

[root@localhost ~]# systemctl start mysqld.service
[root@localhost ~]# systemctl status mysqld.service
  ● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2022-07-15 11:18:43 CST; 57min ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
  Process: 29807 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
 Main PID: 29889 (mysqld)
   Status: "Server is operational"
    Tasks: 39
   Memory: 514.2M
   CGroup: /system.slice/mysqld.service
           └─29889 /usr/sbin/mysqld

7月 15 11:18:34 localhost.localdomain systemd[1]: Starting MySQL Server...
7月 15 11:18:43 localhost.localdomain systemd[1]: Started MySQL Server.

5.查看默认密码

[root@localhost ~]# grep -r password /var/log/mysqld.log 
2022-07-15T03:18:40.695138Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: MpkmgH0X+lPZ

注意此密码随机,根据实际结果替换

6.初始化

使用默认密码登录数据库
[root@localhost mysqlpackage]# mysql -uroot -pMpkmgH0X+lPZ
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 18
Server version: 8.0.29 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> 
注意此时先修改默认密码,不然无法进行任何操作。
mysql> ALTER USER USER() IDENTIFIED BY 'Admin.123';
密码可自定义,但是必须包含大小写以及特殊字符
mysql> show variables like 'validate_password%';
+--------------------------------------+--------+
| Variable_name                        | Value  |
+--------------------------------------+--------+
| validate_password.check_user_name    | ON     |
| validate_password.dictionary_file    |        |
| validate_password.length             | 8      |
| validate_password.mixed_case_count   | 1      |
| validate_password.number_count       | 1      |
| validate_password.policy             | MEDIUM |
| validate_password.special_char_count | 1      |
+--------------------------------------+--------+
7 rows in set (0.00 sec)
可以看出8.0版本对密码强度有默认要求

  • 0
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值