2019年06月10日

MySQL8.0.16


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;


my8.png

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   
---------------------------
my8.png


caching_sha2_password がサポートされていないクライアント、コネクタを使用している場合

posted by a23 at 12:04| Comment(0) | MySQL

2018年07月06日

MySQLパフォーマンスチューニング PDF

MySQLパフォーマンスチューニング概要 - Oracle さんのpdf



InnoDB パフォーマンス Tips

innodb_buffer_pool_size
 MySQL&InnoDBのみを利用していれば、メインメモリの80%程度を割り当てる
 データとインデックスの両方をキャッシュ

innodb_log_file_size

innodb_buffer_pool_sizeの25%?100%
 ログファイルがどの程度頻繁に切り替わっているかをチェック
 値を大きくするとクラッシュ後のリカバリ時間が長くなる
 innodb_flush_log_at_trx_commit
 1 (遅い) コミット時にログをフラッシュ。真のACID
 2 (速い) コミット時にはOSのキャッシュにログをフラッシュ、ディスクとのシンクは毎秒1回
 0 (最速) ログを毎秒1回(またはそれ以下)

起動中の変更は
mysql > set global innodb_flush_log_at_trx_commit = 2;
再起動は、不要のようです

posted by a23 at 17:38| Comment(0) | MySQL