centos 安装mysql8.0.16
清除自带的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的更多相关文章
- Linux(CentOS7)下rpm安装MySQL8.0.16
记录一下自己在 CentOS7 下 rpm 安装 MySQL8.0.16 的过程. 一.准备工作 1. 下载MySQL所需要的安装包 从 MySQL官网 下载,上传至 CentOS 系统 /usr/l ...
- linux mint安装mysql-8.0.16
1.使用通用二进制文件在Unix / Linux上安装MySQL 下载的文件:mysql-8.0.16-linux-glibc2.12-x86_64.tar.xz 注意: 如果您以前使用操作系统本机程 ...
- centos7在线安装mysql8.0.16
一.官网复制安装源地址: 1.进入官网地址:https://dev.mysql.com/downloads/repo/yum/ 二.进入/usr/local目录下 ,创建mysql文件夹 三.使用命令 ...
- Linux(CentOS-8)安装MySQL8.0.11
CentOS安装MySQL8.0.11 总的思路就是:安装MySQL,编写配置文件,配置环境变量,成功开启服务,登陆并修改ROOT密码 开启远程访问的思路就是:授权用户所有IP都可以访问,系统的数据库 ...
- mysql8.0.16二进制安装
mysql8.0.16二进制安装 环境简介操作系统:Centos 6.10 64位 目前版本:8.0.16 MySQL Community Server 二进制 安装目录:/data/mysql/my ...
- centos7编译安装LNMP(nginx-1.16.0,mysql8.0.16,php-7.3.6)常见问题报错及解决方法
LNMP的安装与配置 nginx-1.16.0安装及配置: 第一步:前往官网下载nignx源码包 下载完毕后上传至服务器(先安装lrzsz) yum -y install lrzsz 安装完毕后执行: ...
- Win10下免安装版MySQL8.0.16的安装和配置
1.MySQL8.0.16解压 其中dada文件夹和my.ini配置文件是解压后手动加入的,如下图所示 2.新建配置文件my.ini放在D:\Free\mysql-8.0.16-winx64目录下 [ ...
- win10,64位操作系统安装mysql-8.0.16经验总结(图文详细,保证一次安装成功)
文章目录 1.mysql下载 2.解压及配置文件 3.启动MySQL数据库 4.登录 MySQL 5.配置系统环境变量 6.mysql-8.0.16修改初始密码 机器配置: win10,64位: my ...
- centos 7下安装mysql-8.0
本篇文章主要介绍在centos7 环境下安装mysql8.0并设置为开机自启. 安装步骤 1.配置yum源 首先在 https://dev.mysql.com/downloads/repo/yum/ ...
随机推荐
- Python——Scrapy爬取链家网站所有房源信息
用scrapy爬取链家全国以上房源分类的信息: 路径: items.py # -*- coding: utf-8 -*- # Define here the models for your scrap ...
- Fortify漏洞之Portability Flaw: File Separator 和 Poor Error Handling: Return Inside Finally
继续对Fortify的漏洞进行总结,本篇主要针对 Portability Flaw: File Separator 和 Poor Error Handling: Return Inside Fina ...
- APS的未来会怎么样?历史给了你答案
一项技术从概念推广到实际应用推广需要十五到二十年时间,21世纪的头十年是APS的概念推广时期,随着理论的成熟,软件的实用化,企业应用的深入,下一个十年,APS将是实际应用推广的时期. APS兴起 从上 ...
- 【转载】Gradle学习 第八章:依赖管理基础
转载地址:http://ask.android-studio.org/?/article/10 This chapter introduces some of the basics of depend ...
- 5种处理Vue异常的方法
原文: Handling Errors in Vue.js 译者: Fundebug 本文采用意译,版权归原作者所有 去年一整年,我都在使用最爱的-Vue.js- 来做项目.最近突然意识到,我竟然从来 ...
- 【前端_js】javascript中数组的map()方法
数组的map()方法用于遍历数组,每遍历一个元素就调用回调方法一次,并将回调函数的返回结果作为新数组的元素,被遍历的数组不会被改变. 语法:let newAarray = arr.map(functi ...
- 豆瓣读书isbn 查询
最近学习微信小程序,做一个类似"书库"的小demo,大致流程使用摄像头获取书本后面的isbn,通过豆瓣读书API得到书本介绍.豆瓣评分.图书评论等信息,然鹅https://api. ...
- Windows平台部署 Asp.Net Core 3.1.0,将 ASP.NET Core 应用发布到 IIS ,使用 IIS 在 Windows 上托管 ASP.NET Core
第一部分:本教程介绍如何在 IIS 服务器上托管 ASP.NET Core 应用. 官方文档地址:https://docs.microsoft.com/zh-cn/aspnet/core/tutori ...
- Python基础之while和for
实现ATM的输入密码重新输入的功能 while True: user_db = 'nick' pwd_db = '123' inp_user = input('username: ') inp_pwd ...
- Django MySQL 数据库连接
Django 1.11 官方文档 常规说明 数据库连接 CONN_MAX_AGE 定义数据库连接时限(ALL) default:0 保存在每个请求结束时关闭数据库连接的历史行为. None:保持长连接 ...