mysql 8.2 安装和赋权

发布时间 2023-11-04 20:36:24作者: 一叶菩提一粒尘

1 - 下载安装包

下载地址: https://dev.mysql.com/downloads/mysql/

 

2- 安装

制定目录安装,略。

3- 登录,创建用户并赋权

 1 C:\Users\Administrator>mysql -u root -p
 2 Enter password: ******
 3 Welcome to the MySQL monitor.  Commands end with ; or \g.
 4 Your MySQL connection id is 15
 5 Server version: 8.2.0 MySQL Community Server - GPL
 6 mysql> show databases;
 7 mysql> use mysql;
 8 mysql> select host, user, plugin,  authentication_string, password_expired from user;
 9 mysql> create user spark@'%' identified by '123456' with grant option;
10 mysql> grant all privileges on *.* to 'spark'@'%' with grant option;
11 mysql> flush privileges;
12 Query OK, 0 rows affected (0.78 sec)

 4- 远程登录

 

注意修改安装的bin目录