清除自带的mariadb

> rpm -qa|grep mariadb

mariadb-libs-5.5.44-2.el7.centos.x86_64

> rpm -e --nodeps mariadb-libs-5.5.44-2.el7.centos.x86_64

下载并解压缩 mysql-8.0.16-2.el7.x86_64.rpm-bundle.tar

> tar zvf mysql-8.0.16-2.el7.x86_64.rpm-bundle.tar

> ls -l

-rw-r--r--. 1 root root 607068160 6月 24 10:12 mysql-8.0.16-2.el7.x86_64.rpm-bundle.tar
-rw-r--r--. 1 7155 31415 33432660 5月 3 12:38 mysql-community-client-8.0.16-2.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 588520 5月 3 12:38 mysql-community-common-8.0.16-2.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 5712552 5月 3 12:38 mysql-community-devel-8.0.16-2.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 24493344 5月 3 12:38 mysql-community-embedded-compat-8.0.16-2.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 3127296 5月 3 12:38 mysql-community-libs-8.0.16-2.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 2177156 5月 3 12:38 mysql-community-libs-compat-8.0.16-2.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 422672748 5月 3 12:39 mysql-community-server-8.0.16-2.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 114848996 5月 3 12:40 mysql-community-test-8.0.16-2.el7.x86_64.rpm

开始依次安装:

> yum install -y mysql-community-common-8.0.16-2.el7.x86_64.rpm

> yum install -y mysql-community-libs-8.0.16-2.el7.x86_64.rpm

> yum install -y mysql-community-devel-8.0.16-2.el7.x86_64.rpm

> yum install -y mysql-community-client-8.0.16-2.el7.x86_64.rpm

> yum install -y mysql-community-server-8.0.16-2.el7.x86_64.rpm

启动mysql

> service mysqld start
Redirecting to /bin/systemctl start mysqld.service

修改默认的root密码。

可以在日志文件中找到初始密码:

> grep 'temporary password' /var/log/mysqld.log

2019-06-24T02:32:21.735405Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: ts?7L9#reubW

登录mysql

mysql -h127.0.0.1 -uroot -pts?7L9#reubW
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 10
Server version: 8.0.16

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

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>

修改root密码:

mysql> set global validate_password_policy=0;

mysql> set global validate_password_length=1;

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'Abc@123';

mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'Abc@123' WITH GRANT OPTION;FLUSH PRIVILEGES;

mysql> quit

重启服务

> service mysqld restart

centos 安装mysql8.0.16的更多相关文章

  1. Linux(CentOS7)下rpm安装MySQL8.0.16

    记录一下自己在 CentOS7 下 rpm 安装 MySQL8.0.16 的过程. 一.准备工作 1. 下载MySQL所需要的安装包 从 MySQL官网 下载,上传至 CentOS 系统 /usr/l ...

  2. linux mint安装mysql-8.0.16

    1.使用通用二进制文件在Unix / Linux上安装MySQL 下载的文件:mysql-8.0.16-linux-glibc2.12-x86_64.tar.xz 注意: 如果您以前使用操作系统本机程 ...

  3. centos7在线安装mysql8.0.16

    一.官网复制安装源地址: 1.进入官网地址:https://dev.mysql.com/downloads/repo/yum/ 二.进入/usr/local目录下 ,创建mysql文件夹 三.使用命令 ...

  4. Linux(CentOS-8)安装MySQL8.0.11

    CentOS安装MySQL8.0.11 总的思路就是:安装MySQL,编写配置文件,配置环境变量,成功开启服务,登陆并修改ROOT密码 开启远程访问的思路就是:授权用户所有IP都可以访问,系统的数据库 ...

  5. mysql8.0.16二进制安装

    mysql8.0.16二进制安装 环境简介操作系统:Centos 6.10 64位 目前版本:8.0.16 MySQL Community Server 二进制 安装目录:/data/mysql/my ...

  6. centos7编译安装LNMP(nginx-1.16.0,mysql8.0.16,php-7.3.6)常见问题报错及解决方法

    LNMP的安装与配置 nginx-1.16.0安装及配置: 第一步:前往官网下载nignx源码包 下载完毕后上传至服务器(先安装lrzsz) yum -y install lrzsz 安装完毕后执行: ...

  7. Win10下免安装版MySQL8.0.16的安装和配置

    1.MySQL8.0.16解压 其中dada文件夹和my.ini配置文件是解压后手动加入的,如下图所示 2.新建配置文件my.ini放在D:\Free\mysql-8.0.16-winx64目录下 [ ...

  8. win10,64位操作系统安装mysql-8.0.16经验总结(图文详细,保证一次安装成功)

    文章目录 1.mysql下载 2.解压及配置文件 3.启动MySQL数据库 4.登录 MySQL 5.配置系统环境变量 6.mysql-8.0.16修改初始密码 机器配置: win10,64位: my ...

  9. centos 7下安装mysql-8.0

    本篇文章主要介绍在centos7 环境下安装mysql8.0并设置为开机自启. 安装步骤 1.配置yum源 首先在 https://dev.mysql.com/downloads/repo/yum/  ...

随机推荐

  1. QT绘制B样条曲线

    ²  贝塞尔曲线 贝塞尔曲线是通过一组多边折线的各顶点来定义.在各顶点中,曲线经过第一点和最后一点,其余各点则定义曲线的导数.阶次和形状.第一条和最后一条则表示曲线起点和终点的切线方向. ²  B样条 ...

  2. maven 学习---Maven启用代理访问

    如果你的公司正在建立一个防火墙,并使用HTTP代理服务器来阻止用户直接连接到互联网.如果您使用代理,Maven将无法下载任何依赖. 为了使它工作,你必须声明在 Maven 的配置文件中设置代理服务器: ...

  3. 【软件工程第二次作业】个人项目:WordCountPy

    一.GitHub 地址 项目 GitHub 地址为:https://github.com/bytemo/WordCountTool 二.PSP表格 PSP2.1 Personal Software P ...

  4. 简单mvc---模拟Springmvc

    1.注解篇 Auwowrited package org.aaron.mvc.annaotation; import java.lang.annotation.Documented; import j ...

  5. Nginx 高级配置-https 功能

    Nginx 高级配置-https 功能 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.HTTPS工作过程 1>.SSL/TLS SSL(Secure Socket Lay ...

  6. 盛科(Centec)交换机 SmartConfig 特性

    参考 DHCP manual pages DHCP option-66 & option-150 的区别 一. 原理 目前市场上稍微有些实力的交换机厂商,均支持自动化的批量开局部署,虽然具体实 ...

  7. 从零开始写Hystrix

    1.springboot+自定义注解实现灵活的切面配置 利用aop我们可以实现业务代码与系统级服务例如日志记录.事务及安全相关业务的解耦,使我们的业务代码更加干净整洁. 首先创建一个springboo ...

  8. socket小程序写一个客户端,实现给服务端发送hello World字符串,将客户端发送的数据变成大写后返回

    写一个客户端,实现给服务端发送hello World字符串,将客户端发送的数据变成大写后返回 本机id是192.168.xx.xy 服务端 import socket soc = socket.soc ...

  9. postgres9.5.3升级postgres11.6

    附上postgres下载地址: https://yum.postgresql.org/11/redhat/rhel-7-x86_64/repoview/postgresqldbserver11.gro ...

  10. Java反射之Bean修改更新属性值等工具类

    package com.bocean.util; import java.lang.annotation.Annotation; import java.lang.reflect.Field; imp ...