MySQL ERROR 1290 (HY000) –secure-file-priv option - Stack Overflow
1 2 3 4 5 6 7 8 9 mysql> load data infile 'account.csv' into table authapi.account fields terminated by ',' enclosed by '"'; ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement mysql> SELECT @@GLOBAL.secure_file_priv; +---------------------------+ | @@GLOBAL.secure_file_priv | +---------------------------+ | /var/lib/mysql-files/ | +---------------------------+
1 2 3 4 5 6 7 load data infile 'account.csv' into table authapi.account fields terminated by ',' enclosed by '\\"' escaped by '\\' lines terminated by '\\\\n'
1 2 3 4 5 6 7 8 9 10 11 12 13 14 > show variables like '%time_zone%'; +------------------+--------+ | Variable_name | Value | +------------------+--------+ | system_time_zone | JST | | time_zone | SYSTEM | +------------------+--------+ > select NOW(); +---------------------+ | NOW() | +---------------------+ | 2018-11-16 10:45:53 | +---------------------+
1 2 > SELECT AURORA_VERSION(); > SELECT @@aurora_version;
1 2 -- DB一覧 SHOW databases; 1 2 -- user一覧 SELECT host, user FROM user; 1 2 3 4 5 6 7 8 9 10 11 12 -- ### MySQL内の権限一覧 ### -- グローバルレベル権限のリスト SELECT * FROM information_schema.user_privileges; -- データベースレベル権限のリスト SELECT * FROM information_schema.schema_privileges; -- テーブルレベル権限のリスト SELECT * FROM information_schema.table_privileges; -- カラムレベル権限のリスト SELECT * FROM information_schema.column_privileges; 1 2 -- ユーザ別の権限一覧 SHOW GRANTS FOR '<user>'@'<db>';
1 CREATE user <user-name> IDENTIFIED BY '<password>';