mysql 8.0.X 创建新的数据库、用户并授权

一、创建数据库

mysql> create database jira;
Query OK, 0 rows affected (0.09 sec)

二、创建用户

mysql> create user 'jira'@'%' identified by 'jira123';
Query OK, 0 rows affected (0.09 sec)

三、授权用户

mysql> grant all privileges on jira.* to 'jira'@'%' with grant option;
Query OK, 0 rows affected (0.10 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
posted @ 2019-04-29 16:25  煦色韶光  阅读(4208)  评论(0编辑  收藏  举报