MariaDB配置
参考地址:https://mariadb.com/docs/server/ref/cs10.5/system-variables/
查询所有全局系统变量:
SHOW GLOBAL VARIABLES;
动态设置全局系统变量:
SET GLOBAL log_warnings=3;
查询当前会话的所有系统变量:
SHOW SESSION VARIABLES;
动态设置当前会话变量:
SET SESSION log_warnings=3;
查询结果筛选:
LIKE:
SHOW GLOBAL VARIABLES LIKE 'log_%';
WHERE:
SHOW GLOBAL VARIABLES WHERE Variable_name IN( 'log_error', 'log_warnings' );
查询引用值:
全局系统变量:
MariaDB [(none)]> select @@global.log_warnings; +-----------------------+ | @@global.log_warnings | +-----------------------+ | 2 | +-----------------------+
会话系统变量:
MariaDB [(none)]> select @@session.log_warnings; +------------------------+ | @@session.log_warnings | +------------------------+ | 2 | +------------------------+ 1 row in set (0.000 sec)