[root@KVM_2 ~]
[root@KVM_2 ~]
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection
id
is 1
Server version: 5.7.1-TiDB-1.0 MySQL Community Server (GPL)
Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
Type
'help;'
or
'\h'
for
help. Type
'\c'
to
clear
the current input statement.
MySQL [
test
]> show databases;
+--------------------+
| Database |
+--------------------+
| INFORMATION_SCHEMA |
| PERFORMANCE_SCHEMA |
| mysql |
|
test
|
+--------------------+
4 rows
in
set
(0.00 sec)
MySQL [(none)]>
select
user from mysql.user;
+------+
| user |
+------+
| root |
+------+
1 row
in
set
(0.00 sec)
MySQL [(none)]> create database wordpressdb;
Query OK, 0 rows affected (2.02 sec)
MySQL [(none)]> create user
'wordpressuser'
@
'localhost'
identified by
'123456'
;
Query OK, 1 row affected (0.01 sec)
MySQL [(none)]> grant all on wordpressdb.* to
'wordpressuser'
@
'localhost'
identified by
'123456'
;;
Query OK, 0 rows affected (0.02 sec)
MySQL [(none)]> grant all on wordpressdb.* to
'wordpressuser'
@
'%'
identified by
'123456'
;;
Query OK, 1 row affected (0.02 sec)
MySQL [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
MySQL [(none)]>
exit
Bye
MySQL [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| INFORMATION_SCHEMA |
| PERFORMANCE_SCHEMA |
| mysql |
|
test
|
| wordpressdb |
+--------------------+
5 rows
in
set
(0.00 sec)
MySQL [
test
]>
exit