This node was decommissioned and will not rejoin the ring unless cassandra.override_decommission=true has been set, or all existing data is removed and th e node is bootstrapped again Fatal configuration error; unable to start server. See log for stacktrace. ERROR [main] 2019-02-12 06:03:30,000 CassandraDaemon.java:749 - Fatal configuration error org.apache.cassandra.exceptions.ConfigurationException: This node was decommissioned and will not rejoin the ring unless cassandra.override_decommission=t rue has been set, or all existing data is removed and the node is bootstrapped again
root@db 02:48: [(none)]> show variables like '%secure_file%'; +------------------+-------+ | Variable_name | Value | +------------------+-------+ | secure_file_priv | NULL | +------------------+-------+ 1 row in set (0.00 sec) root@db 02:48: [test]> select * from t1; +----+ | c1 | +----+ | 1 | +----+ 1 row in set (0.00 sec)
在值为null的时候是不允许导出数据的
1 2
root@db 02:48: [test]> select * from t1 into outfile '/tmp/t1.xls'; ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
root@db 02:49: [test]> set global secure_file_priv='/data/test'; ERROR 1238 (HY000): Variable 'secure_file_priv' is a read only variable
重启完之后,查看secure参数:
1 2 3 4 5 6 7
root@db 03:08: [(none)]> show variables like '%secure_file%'; +------------------+-------+ | Variable_name | Value | +------------------+-------+ | secure_file_priv | /tmp/ | +------------------+-------+ 1 row in set (0.02 sec)
3、导出查询数据
1 2
root@db 04:16: [test]> select * from mysql.user into outfile '/tmp/user.xls'; Query OK, 5 rows affected (0.01 sec)
如果导出的目录不是secure_file_priv指定的目录,报错:
1 2
root@db 00:17: [test]> select * from t1 into outfile '/data/t1.xls'; ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
14:16:23 SYS@ boston> alter user test identified by oracle; alter user test identified by oracle * ERROR at line 1: ORA-28003: password verification for the specified password failed ORA-20001: Password length less than 8
3、查看修改后的概要文件下的参数
1 2 3 4 5 6 7 8 9 10
SELECT * FROM dba_profiles s WHERE s.profile='DEFAULT' AND resource_name like 'PASSWORD%';
15:04:58 SYS@ boston> alter user test identified by Testdb123 User altered. Elapsed: 00:00:00.11 15:06:04 SYS@ boston> alter user test identified by Testdb123; User altered.
15:13:17 SYS@ boston> ALTER PROFILE DEFAULT LIMIT PASSWORD_REUSE_TIME 1; Profile altered. Elapsed: 00:00:00.08 15:13:18 SYS@ boston> SELECT * FROM dba_profiles s WHERE s.profile='DEFAULT' AND resource_name like 'PASSWORD%';
PROFILE RESOURCE_NAME RESOURCE LIMIT ------------------------------ -------------------------------- -------- ---------------------------------------- DEFAULT PASSWORD_LIFE_TIME PASSWORD 180 DEFAULT PASSWORD_REUSE_TIME PASSWORD 1 DEFAULT PASSWORD_REUSE_MAX PASSWORD UNLIMITED DEFAULT PASSWORD_VERIFY_FUNCTION PASSWORD VERIFY_FUNCTION_11G DEFAULT PASSWORD_LOCK_TIME PASSWORD 1 DEFAULT PASSWORD_GRACE_TIME PASSWORD 7 再次修改用户已经提示 15:13:22 SYS@ boston> alter user test identified by Testdb123; alter user test identified by Testdb123 * ERROR at line 1: ORA-28007: the password cannot be reused Elapsed: 00:00:00.02
15:21:45 SYS@ boston> ALTER PROFILE DEFAULT LIMIT PASSWORD_REUSE_TIME 1; Profile altered. Elapsed: 00:00:00.05 15:21:46 SYS@ boston> SELECT * FROM dba_profiles s WHERE s.profile='DEFAULT' AND resource_name like 'PASSWORD%';
PROFILE RESOURCE_NAME RESOURCE LIMIT ------------------------------ -------------------------------- -------- ---------------------------------------- DEFAULT PASSWORD_LIFE_TIME PASSWORD 180 DEFAULT PASSWORD_REUSE_TIME PASSWORD 1 DEFAULT PASSWORD_REUSE_MAX PASSWORD 5 DEFAULT PASSWORD_VERIFY_FUNCTION PASSWORD VERIFY_FUNCTION_11G DEFAULT PASSWORD_LOCK_TIME PASSWORD 1 DEFAULT PASSWORD_GRACE_TIME PASSWORD 7 设置一天之后,并且修改5次不同密码之后才能复用之前的密码,下面为了满足要求,修改系统时间: 15:23:00 SYS@ boston> select sysdate from dual; SYSDATE ------------------- 2019:01:23 15:23:04 [oracle@dax-mysql-slave admin]$ date -s 20190125 date: 无法设置日期: 不允许的操作 2019年 01月 25日 星期五 00:00:00 CST [oracle@dax-mysql-slave admin]$ exit 登出 [root@dax-mysql-slave ~]# date -s 20190125 2019年 01月 25日 星期五 00:00:00 CST [root@dax-mysql-slave ~]# su - oracle 上一次登录:三 1月 23 13:44:53 CST 2019pts/2 上 [oracle@dax-mysql-slave ~]$ date 2019年 01月 25日 星期五 00:00:06 CST [oracle@dax-mysql-slave ~]$ sql 00:00:26 SYS@ boston> select sysdate from dual; SYSDATE ------------------- 2019:01:25 00:00:34 Elapsed: 00:00:00.00 00:00:34 SYS@ boston> SELECT * FROM dba_profiles s WHERE s.profile='DEFAULT' AND resource_name like 'PASSWORD%'; PROFILE RESOURCE_NAME RESOURCE LIMIT ------------------------------ -------------------------------- -------- ---------------------------------------- DEFAULT PASSWORD_LIFE_TIME PASSWORD 180 DEFAULT PASSWORD_REUSE_TIME PASSWORD 1 DEFAULT PASSWORD_REUSE_MAX PASSWORD 5 DEFAULT PASSWORD_VERIFY_FUNCTION PASSWORD VERIFY_FUNCTION_11G DEFAULT PASSWORD_LOCK_TIME PASSWORD 1 DEFAULT PASSWORD_GRACE_TIME PASSWORD 7 6 rows selected. Elapsed: 00:00:00.03 修改5次不同的密码: 00:04:17 SYS@ boston> alter user test identified by Testdb128; User altered. Elapsed: 00:00:00.08 00:04:29 SYS@ boston> alter user test identified by Testdb129; User altered. Elapsed: 00:00:00.03 00:04:33 SYS@ boston> alter user test identified by Testdb130; User altered. Elapsed: 00:00:00.04 00:04:37 SYS@ boston> alter user test identified by Testdb131; User altered. Elapsed: 00:00:00.04 00:04:39 SYS@ boston> alter user test identified by Testdb132; User altered. 修改5次之后再次修改为以前的密码,修改正常: Elapsed: 00:00:00.04 00:04:40 SYS@ boston> alter user test identified by Testdb123; User altered. 再次修改为上面修改的新的密码,提示不能复用: Elapsed: 00:00:00.05 00:04:46 SYS@ boston> alter user test identified by Testdb130; alter user test identified by Testdb130 * ERROR at line 1: ORA-28007: the password cannot be reused Elapsed: 00:00:00.02 00:04:56 SYS@ boston>
root@db 01:07: [(none)]> grant all privileges on *.* to testuser; ERROR 1133 (42000): Can't find any matching row in the user table root@db 01:07: [(none)]> grant all privileges on *.* to testuser identified by 'testuser'; Query OK, 0 rows affected, 1 warning (0.01 sec)
2、sql_mode不存在NO_AUTO_CREATE_USER情况下
1 2 3 4 5 6 7 8 9 10 11
root@db 01:14: [(none)]> set @@sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"; Query OK, 0 rows affected, 1 warning (0.00 sec) root@db 01:17: [(none)]> show variables like '%sql_mode%'; +---------------+----------------------------------------------------------------------------------------------------+ | Variable_name | Value | +---------------+----------------------------------------------------------------------------------------------------+ | sql_mode | STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION | +---------------+----------------------------------------------------------------------------------------------------+ 1 row in set (0.01 sec) root@db 01:17: [(none)]> grant all privileges on *.* to testuser1; Query OK, 0 rows affected, 1 warning (0.01 sec)
NO_AUTO_CREATE_USER参数在未来将会被弃用,被弃用的原因是基于对复制安全性的考虑。而基于复制安全性的考虑,对用户进行管理操作的更好方法是使用:CREATE USER IF NOT EXISTS, DROP USER IF EXISTS, 和ALTER USER IF EXISTS而不是grant命令。这些语句可以保证复制的安全性当从库存在和主库的不同权限。
13:51:26 SYS@ boston> select * from nls_database_parameters;
PARAMETER VALUE ------------------------------------------------------------ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- NLS_LANGUAGE AMERICAN NLS_TERRITORY AMERICA NLS_CURRENCY $ NLS_ISO_CURRENCY AMERICA NLS_NUMERIC_CHARACTERS ., NLS_CHARACTERSET AL32UTF8 NLS_CALENDAR GREGORIAN NLS_DATE_FORMAT DD-MON-RR NLS_DATE_LANGUAGE AMERICAN NLS_SORT BINARY NLS_TIME_FORMAT HH.MI.SSXFF AM NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR NLS_DUAL_CURRENCY $ NLS_COMP BINARY NLS_LENGTH_SEMANTICS BYTE NLS_NCHAR_CONV_EXCP FALSE NLS_NCHAR_CHARACTERSET AL16UTF16 NLS_RDBMS_VERSION 11.2.0.4.0
提示要修改的新的字符集必须大于旧的字符集才可以
1 2 3 4 5
13:51:36 SYS@ boston> ALTER DATABASE CHARACTER SET ZHS16GBK; ALTER DATABASE CHARACTER SET ZHS16GBK * ERROR at line 1: ORA-12712: new character set must be a superset of old character set
跳过超集的检查
1 2 3 4 5 6 7 8
13:59:34 SYS@ boston> alter system enable restricted session; System altered. Elapsed: 00:00:02.05 13:59:48 SYS@ boston> ALTER DATABASE character set INTERNAL_USE ZHS16GBK; ALTER DATABASE character set INTERNAL_USE ZHS16GBK * ERROR at line 1: ORA-12721: operation cannot execute when other sessions are active
14:06:46 SYS@ boston> alter system kill session '207,145'; System altered. Elapsed: 00:00:00.00 14:07:11 SYS@ boston> alter system kill session '306,199'; System altered.
14:07:27 SYS@ boston> select sid, serial#,program ,status from v$session;
SID SERIAL# PROGRAM STATUS ---------- ---------- ------------------------------------------------------------------------------------------------ ---------------- 1 1 oracle@dax-mysql-slave (VKTM) ACTIVE 2 1 oracle@dax-mysql-slave (DIA0) ACTIVE 3 1 oracle@dax-mysql-slave (CKPT) ACTIVE 4 3 oracle@dax-mysql-slave (MMNL) ACTIVE 6 11 oracle@dax-mysql-slave (SMCO) ACTIVE 101 1 oracle@dax-mysql-slave (GEN0) ACTIVE 102 1 oracle@dax-mysql-slave (MMAN) ACTIVE 103 1 oracle@dax-mysql-slave (SMON) ACTIVE 105 1603 sqlplus@dax-mysql-slave (TNS V1-V3) ACTIVE 201 1 oracle@dax-mysql-slave (PMON) ACTIVE 202 1 oracle@dax-mysql-slave (DIAG) ACTIVE 203 1 oracle@dax-mysql-slave (DBW0) ACTIVE 204 1 oracle@dax-mysql-slave (RECO) ACTIVE 207 145 sqlplus@dax-mysql-slave (TNS V1-V3) KILLED 302 1 oracle@dax-mysql-slave (PSP0) ACTIVE 303 1 oracle@dax-mysql-slave (DBRM) ACTIVE 304 1 oracle@dax-mysql-slave (LGWR) ACTIVE 305 3 oracle@dax-mysql-slave (MMON) ACTIVE 306 199 sqlplus@dax-mysql-slave (TNS V1-V3) KILLED
再次执行仍然提示有活动会话
1 2 3 4 5
14:07:29 SYS@ boston> ALTER DATABASE character set INTERNAL_USE ZHS16GBK; ALTER DATABASE character set INTERNAL_USE ZHS16GBK * ERROR at line 1: ORA-12721: operation cannot execute when other sessions are active
Total System Global Area 1603411968 bytes Fixed Size 2253664 bytes Variable Size 503319712 bytes Database Buffers 1090519040 bytes Redo Buffers 7319552 bytes Database mounted. Database opened. 14:11:46 SYS@ boston> select sid, serial#,program ,status from v$session; SID SERIAL# PROGRAM STATUS ---------- ---------- ------------------------------------------------------------------------------------------------ ---------------- 1 1 oracle@dax-mysql-slave (VKTM) ACTIVE 2 1 oracle@dax-mysql-slave (DIA0) ACTIVE 3 1 oracle@dax-mysql-slave (CKPT) ACTIVE 4 1 oracle@dax-mysql-slave (MMNL) ACTIVE 101 1 oracle@dax-mysql-slave (GEN0) ACTIVE 102 1 oracle@dax-mysql-slave (MMAN) ACTIVE 103 1 oracle@dax-mysql-slave (SMON) ACTIVE 201 1 oracle@dax-mysql-slave (PMON) ACTIVE 202 1 oracle@dax-mysql-slave (DIAG) ACTIVE 203 1 oracle@dax-mysql-slave (DBW0) ACTIVE 204 1 oracle@dax-mysql-slave (RECO) ACTIVE 301 5 sqlplus@dax-mysql-slave (TNS V1-V3) ACTIVE 302 1 oracle@dax-mysql-slave (PSP0) ACTIVE 303 1 oracle@dax-mysql-slave (DBRM) ACTIVE 304 1 oracle@dax-mysql-slave (LGWR) ACTIVE 305 1 oracle@dax-mysql-slave (MMON) ACTIVE 16 rows selected.
Elapsed: 00:00:00.03 14:11:47 SYS@ boston> alter system enable restricted session; System altered. Elapsed: 00:00:02.04 14:12:00 SYS@ boston> ALTER DATABASE character set INTERNAL_USE ZHS16GBK; Database altered.
15:01:20 SYS@ boston> select * from nls_database_parameters;
PARAMETER VALUE ------------------------------ -------------------------------------------------------------------------------- NLS_LANGUAGE AMERICAN NLS_TERRITORY AMERICA NLS_CURRENCY $ NLS_ISO_CURRENCY AMERICA NLS_NUMERIC_CHARACTERS ., NLS_CHARACTERSET ZHS16GBK NLS_CALENDAR GREGORIAN NLS_DATE_FORMAT DD-MON-RR NLS_DATE_LANGUAGE AMERICAN NLS_SORT BINARY NLS_TIME_FORMAT HH.MI.SSXFF AM NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR NLS_DUAL_CURRENCY $ NLS_COMP BINARY NLS_LENGTH_SEMANTICS BYTE NLS_NCHAR_CONV_EXCP FALSE NLS_NCHAR_CHARACTERSET AL16UTF16 NLS_RDBMS_VERSION 11.2.0.4.0 20 rows selected. 15:05:51 SYS@ boston> alter system enable restricted session; System altered. Elapsed: 00:00:02.06 15:07:05 SYS@ boston> ALTER DATABASE character set AL32UTF8; ALTER DATABASE character set AL32UTF8 * ERROR at line 1: ORA-12712: new character set must be a superset of old character set Elapsed: 00:00:00.00
15:07:12 SYS@ boston> ALTER DATABASE character set INTERNAL_USE AL32UTF8; ALTER DATABASE character set INTERNAL_USE AL32UTF8 * ERROR at line 1: ORA-12721: operation cannot execute when other sessions are active