CentOS7 安装mysql8.0(YUM方式)

1.下载mysql源安装包

shell> wget http://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm

2.安装mysql源

shell> yum localinstall mysql80-community-release-el7-1.noarch.rpm

3.检查mysql源是否安装成功

shell> yum repolist enabled | grep "mysql.*-community.*"

4.修改 vim /etc/yum.repos.d/mysql-community.repo源 ,改变默认安装的mysql版本。比如要安装5.6版本,将5.7源的enabled=1改成enabled=0。然后再将5.6源的enabled=0改成enabled=1即可。

5.安装MySQL

shell> yum install mysql-community-server

6.启动MySQL服务

shell> systemctl start mysqld

7.开机启动

shell> systemctl enable mysqld

shell> systemctl daemon-reload

8.修改root本地登录密码

1)查看mysql密码

shell> grep ‘temporary password‘ /var/log/mysqld.log

2)连接mysql

shell> mysql -uroot -p

3)修改密码[注意:后面的分号一定要跟上]

mysql> ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘MyNewPass4!‘;

或者:

mysql> set password for ‘root‘@‘localhost‘=password(‘MyNewPass4!‘);

mysql> show variables like ‘%password%‘;

9.添加远程登录用户

mysql> GRANT ALL PRIVILEGES ON *.* TO ‘caoxiaobo‘@‘%‘ IDENTIFIED BY ‘Caoxiaobo0917!‘ WITH GRANT OPTION;

原文地址:https://www.cnblogs.com/duanweishi/p/9526221.html

时间: 2024-08-30 12:57:02

CentOS7 安装mysql8.0(YUM方式)的相关文章

centos7 安装 mysql-8.0

本文介绍使用rpm包安装mysql, 以 mysql-8.0.17-1.el7.x86_64.rpm-bundle.tar 为例: 1.下载 MySQL下载地址:https://dev.mysql.com/downloads/mysql/ 可以直接在centos里面用wget命令下载,或者在自己电脑上下完再传上去 2.解压tar包 tar -xvf mysql-8.0.17-1.el7.x86_64.rpm-bundle.tar 3.移除centos7自带的mariadb-libs包,不移除的话

centos7安装mysql8.0

MySQL 8 正式版 8.0.11 已发布,官方表示 MySQL 8 要比 MySQL 5.7 快 2 倍,还带来了大量的改进和更快的性能! mysql8.0安装步骤: 1.添加yum安装库 安装库的下载地址:https://repo.mysql.com//mysql80-community-release-el7-2.noarch.rpm wget https://repo.mysql.com//mysql80-community-release-el7-2.noarch.rpm rpm -

centos7安装mysql-8.0.15

1.获取mysql   wget https://cdn.mysql.com/archives/mysql-8.0/mysql-8.0.15-linux-glibc2.12-x86_64.tar.xz   (安装wget命令:yum install wget -y)2.解压mysql   xz -d mysql-8.0.15-linux-glibc2.12-x86_64.tar.xz   tar -xvf mysql-8.0.15-linux-glibc2.12-x86_64.tar3.移动文件

centos7安装MongoDB4.0(yum安装)

1.添加 yum repo vi /etc/yum.repos.d/mongodb-org-4.0.repo 添加如下内容 [mongodb-org-4.0] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/ser

CentOS7 安装mysql(YUM方式)

1.下载mysql源安装包 shell> wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm 2.安装mysql源 shell> yum localinstall mysql57-community-release-el7-8.noarch.rpm 3.检查mysql源是否安装成功 shell> yum repolist enabled | grep "mysql.*-communit

centOS7安装mysql8.0完美教程!!只要按照步骤,无脑操作,一次成功!

查看防火墙systemctl status firewalld重启防火墙systemctl start firewalld 1.mysql 首先关闭防火墙 systemctl stop firewalld 1.1 检查系统是否已经安装过mysql rpm -qa|grep mariadb 如果查询到结果,证明已经安装过,必须先卸载 1.2 卸载mariadb rpm -e --nodeps mariadb-libs 1.3 由于mysql会产生临时文件存到/tmp文件夹中,如果使用非root管理

Centos7安装mysql8.0,开启远程访问

1.获取和安装官方yum源 wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm sudo rpm -ivh mysql80-community-release-el7-3.noarch.rpm 执行成功后会在/etc/yum.repos.d/目录下生成两个repo文件mysql-community.repo及 mysql-community-source.repo yum repolist enabl

CentOS7.6使用yum安装MySQL8.0

CentOS7.6使用yum安装MySQL8.0 1.yum仓库下载MySQL:sudo yum localinstall https://dev.mysql.com/get/mysql80-community-release-el7-2.noarch.rpm 2.yum安装MySQL:sudo yum install mysql-community-server 3.启动MySQL服务:sudo service mysqld start 4.检查MySQL服务状态:sudo service m

Centos7下Mysql8.0安装手册 以及 一些坑点总结

MySQL 8 正式版 8.0.11 已发布,官方表示 MySQL 8 要比 MySQL 5.7 快 2 倍,还带来了大量的改进和更快的性能! 一.  Mysql8.0版本相比之前版本的一些特性 1) 默认编码utf8默认编码使用utf8mb4, utf8mb4编码是utf8编码的超集,兼容utf8,并且能存储4字节的表情字符历史,MySQL数据库的 "utf8"并不是真正概念里的 UTF-8.MySQL中的"utf8"编码只支持最大3字节每字符.真正的大家正在使用