MySQL 8 - Unknown system variable log warnings

Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2024
Перейти к:навигация, поиск

MySQL 8 - Unknown system variable log warnings

Ошибка

mysql> SET GLOBAL log_warnings=0;
ERROR 1193 (HY000): Unknown system variable 'log_warnings'

Переменная log_warnings в MySQL 8 была заменена на log_error_verbosity

The deprecated log_warnings system variable and --log-warnings server option have been removed. Use the log_error_verbosity system variable instead. (WL #9676)

то есть https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_log_error_verbosity

mysql> SET GLOBAL log_error_verbosity=1;
Query OK, 0 rows affected (0.01 sec)
Default Value	2
Minimum Value	1
Maximum Value	3

Уровни логирования:

1	ERROR
2	ERROR, WARNING
3	ERROR, WARNING, INFORMATION

Проверяем значение переменной:

mysql> SHOW VARIABLES LIKE '%log_error_verbosity%';
+---------------------+-------+
| Variable_name       | Value |
+---------------------+-------+
| log_error_verbosity | 1     |
+---------------------+-------+
1 row in set (0.00 sec)


Посмотреть все переменные по логам:

mysql> SHOW VARIABLES LIKE '%log%';
+------------------------------------------------+---------------------------------------------+
| Variable_name                                  | Value                                       |
+------------------------------------------------+---------------------------------------------+
| activate_all_roles_on_login                    | OFF                                         |
| back_log                                       | 151                                         |
| binlog_cache_size                              | 32768                                       |
| binlog_checksum                                | CRC32                                       |
| binlog_direct_non_transactional_updates        | OFF                                         |
| binlog_encryption                              | OFF                                         |
| binlog_error_action                            | ABORT_SERVER                                |
| binlog_expire_logs_auto_purge                  | ON                                          |
| binlog_expire_logs_seconds                     | 2592000                                     |
| binlog_format                                  | ROW                                         |
| binlog_group_commit_sync_delay                 | 0                                           |
| binlog_group_commit_sync_no_delay_count        | 0                                           |
| binlog_gtid_simple_recovery                    | ON                                          |
| binlog_max_flush_queue_time                    | 0                                           |
| binlog_order_commits                           | ON                                          |
| binlog_rotate_encryption_master_key_at_startup | OFF                                         |
| binlog_row_event_max_size                      | 8192                                        |
| binlog_row_image                               | FULL                                        |
| binlog_row_metadata                            | MINIMAL                                     |
| binlog_row_value_options                       |                                             |
| binlog_rows_query_log_events                   | OFF                                         |
| binlog_stmt_cache_size                         | 32768                                       |
| binlog_transaction_compression                 | OFF                                         |
| binlog_transaction_compression_level_zstd      | 3                                           |
| binlog_transaction_dependency_history_size     | 25000                                       |
| binlog_transaction_dependency_tracking         | COMMIT_ORDER                                |
| expire_logs_days                               | 0                                           |
| general_log                                    | OFF                                         |
| general_log_file                               | /var/lib/mysql/vps-966829f5.log             |
| innodb_api_enable_binlog                       | OFF                                         |
| innodb_flush_log_at_timeout                    | 1                                           |
| innodb_flush_log_at_trx_commit                 | 1                                           |
| innodb_log_buffer_size                         | 16777216                                    |
| innodb_log_checksums                           | ON                                          |
| innodb_log_compressed_pages                    | ON                                          |
| innodb_log_file_size                           | 50331648                                    |
| innodb_log_files_in_group                      | 2                                           |
| innodb_log_group_home_dir                      | ./                                          |
| innodb_log_spin_cpu_abs_lwm                    | 80                                          |
| innodb_log_spin_cpu_pct_hwm                    | 50                                          |
| innodb_log_wait_for_flush_spin_hwm             | 400                                         |
| innodb_log_write_ahead_size                    | 8192                                        |
| innodb_log_writer_threads                      | ON                                          |
| innodb_max_undo_log_size                       | 1073741824                                  |
| innodb_online_alter_log_max_size               | 134217728                                   |
| innodb_print_ddl_logs                          | OFF                                         |
| innodb_redo_log_archive_dirs                   |                                             |
| innodb_redo_log_capacity                       | 104857600                                   |
| innodb_redo_log_encrypt                        | OFF                                         |
| innodb_undo_log_encrypt                        | OFF                                         |
| innodb_undo_log_truncate                       | ON                                          |
| log_bin                                        | ON                                          |
| log_bin_basename                               | /var/lib/mysql/binlog                       |
| log_bin_index                                  | /var/lib/mysql/binlog.index                 |
| log_bin_trust_function_creators                | OFF                                         |
| log_bin_use_v1_row_events                      | OFF                                         |
| log_error                                      | /var/log/mysql/error.log                    |
| log_error_services                             | log_filter_internal; log_sink_internal      |
| log_error_suppression_list                     |                                             |
| log_error_verbosity                            | 1                                           |
| log_output                                     | FILE                                        |
| log_queries_not_using_indexes                  | OFF                                         |
| log_raw                                        | OFF                                         |
| log_replica_updates                            | ON                                          |
| log_slave_updates                              | ON                                          |
| log_slow_admin_statements                      | OFF                                         |
| log_slow_extra                                 | OFF                                         |
| log_slow_replica_statements                    | OFF                                         |
| log_slow_slave_statements                      | OFF                                         |
| log_statements_unsafe_for_binlog               | ON                                          |
| log_throttle_queries_not_using_indexes         | 0                                           |
| log_timestamps                                 | UTC                                         |
| max_binlog_cache_size                          | 18446744073709547520                        |
| max_binlog_size                                | 1073741824                                  |
| max_binlog_stmt_cache_size                     | 18446744073709547520                        |
| max_relay_log_size                             | 0                                           |
| relay_log                                      | vps-966829f5-relay-bin                      |
| relay_log_basename                             | /var/lib/mysql/vps-966829f5-relay-bin       |
| relay_log_index                                | /var/lib/mysql/vps-966829f5-relay-bin.index |
| relay_log_info_file                            | relay-log.info                              |
| relay_log_info_repository                      | TABLE                                       |
| relay_log_purge                                | ON                                          |
| relay_log_recovery                             | OFF                                         |
| relay_log_space_limit                          | 0                                           |
| slow_query_log                                 | OFF                                         |
| slow_query_log_file                            | /var/lib/mysql/vps-966829f5-slow.log        |
| sql_log_bin                                    | ON                                          |
| sql_log_off                                    | OFF                                         |
| sync_binlog                                    | 1                                           |
| sync_relay_log                                 | 10000                                       |
| sync_relay_log_info                            | 10000                                       |
| terminology_use_previous                       | NONE                                        |
+------------------------------------------------+---------------------------------------------+
92 rows in set (0.01 sec)