安装mysql8.0.11

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了安装mysql8.0.11相关的知识,希望对你有一定的参考价值。

1、安装依赖关系

yum -y install openssl-devel
yum install perl-JSON

2、安装mysql(要一起安装)

rpm -ivh mysql-community-common-8.0.11-1.el7.x86_64.rpm
mysql-community-devel-8.0.11-1.el7.x86_64.rpm
mysql-community-embedded-compat-8.0.11-1.el7.x86_64.rpm
mysql-community-libs-8.0.11-1.el7.x86_64.rpm
mysql-community-server-8.0.11-1.el7.x86_64.rpm
mysql-community-client-8.0.11-1.el7.x86_64.rpm
mysql-community-test-8.0.11-1.el7.x86_64.rpm

3、查看密码

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

4、登陆后重新设置root密码

ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘Fan2018!‘;

5、创建用户

CREATE USER ‘fangx‘@‘%‘ IDENTIFIED WITH mysql_native_password BY ‘Fan2018!‘;

#(需要注意:mysql8.0加密方式修改了)
#检查用户

select user, host, plugin, authentication_string from user\G;

6、授权远程数据库

#授权所有权限 
GRANT ALL PRIVILEGES ON *.* TO ‘fangx‘@‘%‘;
 #授权基本的查询修改权限,按需求设置
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER ON *.* TO ‘fangx‘@‘%‘;

7、查看用户权限
show grants for ‘fangx‘@‘%‘;

以上是关于安装mysql8.0.11的主要内容,如果未能解决你的问题,请参考以下文章

mysql8.0.11 在windows64安装 步骤

windows10+mysql8.0.11zip安装

Ubuntu18.04 安装mysql8.0.11

Windows环境安装MySQL8.0.11

win10 安装MySQL8.0.11记录。

MySQL8.0.11 for linux7.2 二进制安装