CREATE DATABASE testdb1;
CREATE DATABASE testdb2;
CREATE USER myuser1@'%' identified by 'Passwd643';
CREATE USER myuser2@'192.168.24.0/24' identified by 'Passwd643';
USE testdb1;
GRANT DELETE,INSERT,SELECT,UPDATE ON test1*.* to myuser1@'%';
USE testdb2;
GRANT DELETE,INSERT,SELECT,UPDATE ON test2*.* to myuser2@'192.168.24.0/24';
FLUSH PRIVILEGES;
Enter password: *********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 21
Server version: 8.0.16 MySQL Community Server - GPL
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> CREATE DATABASE testdb1;
Query OK, 1 row affected (0.01 sec)
mysql> CREATE DATABASE testdb2;
Query OK, 1 row affected (0.01 sec)
mysql> CREATE USER myuser1@'%' identified by 'Passwd643';
Query OK, 0 rows affected (0.07 sec)
mysql> CREATE USER myuser2@'192.168.24.0/24' identified by 'Passwd643';
ERROR 1396 (HY000): Operation CREATE USER failed for 'myuser2'@'192.168.24.0/24'
mysql> GRANT DELETE,INSERT,SELECT,UPDATE ON test1*.* to myuser1@'%';
ERROR 1046 (3D000): No database selected
mysql> USE testdb1;
Database changed
mysql> GRANT DELETE,INSERT,SELECT,UPDATE ON test1*.* to myuser1@'%';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
for the right syntax to use near '*.* to myuser1@'%'' at line 1
mysql>
---------------------------
Firedac_mysql80
---------------------------
[FireDAC][Phys][MySQL] Authentication plugin 'caching_sha2_password' cannot be loaded: 指定されたモジュールが見つかりません。
---------------------------
OK
---------------------------
caching_sha2_password がサポートされていないクライアント、コネクタを使用している場合