major / MySQLTuner-perl

MySQLTuner is a script written in Perl that will assist you with your MySQL configuration and make recommendations for increased performance and stability.
GNU General Public License v3.0
8.93k stars 1.29k forks source link

Error log file doesn't exist ? #357

Closed marulitua closed 5 years ago

marulitua commented 6 years ago

Mysql Tuner cannot detect my error log

mysql -u root -p -e "show variables like '%log%'"

+-----------------------------------------+----------------------------------------------------+
| Variable_name                           | Value                                              |
+-----------------------------------------+----------------------------------------------------+
| back_log                                | 80                                                 |
| binlog_cache_size                       | 32768                                              |
| binlog_checksum                         | CRC32                                              |
| binlog_direct_non_transactional_updates | OFF                                                |
| binlog_error_action                     | ABORT_SERVER                                       |
| 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_row_image                        | FULL                                               |
| binlog_rows_query_log_events            | OFF                                                |
| binlog_stmt_cache_size                  | 32768                                              |
| expire_logs_days                        | 10                                                 |
| general_log                             | OFF                                                |
| general_log_file                        | /var/lib/mysql/manobo-service-user.log             |
| innodb_api_enable_binlog                | OFF                                                |
| innodb_flush_log_at_timeout             | 1                                                  |
| innodb_flush_log_at_trx_commit          | 1                                                  |
| innodb_locks_unsafe_for_binlog          | OFF                                                |
| 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_write_ahead_size             | 8192                                               |
| innodb_max_undo_log_size                | 1073741824                                         |
| innodb_online_alter_log_max_size        | 134217728                                          |
| innodb_undo_log_truncate                | OFF                                                |
| innodb_undo_logs                        | 128                                                |
| log_bin                                 | OFF                                                |
| log_bin_basename                        |                                                    |
| log_bin_index                           |                                                    |
| log_bin_trust_function_creators         | OFF                                                |
| log_bin_use_v1_row_events               | OFF                                                |
| log_builtin_as_identified_by_password   | OFF                                                |
| log_error                               | /var/log/mysql/error.log                           |
| log_error_verbosity                     | 3                                                  |
| log_output                              | FILE                                               |
| log_queries_not_using_indexes           | OFF                                                |
| log_slave_updates                       | OFF                                                |
| log_slow_admin_statements               | OFF                                                |
| log_slow_slave_statements               | OFF                                                |
| log_statements_unsafe_for_binlog        | ON                                                 |
| log_syslog                              | OFF                                                |
| log_syslog_facility                     | daemon                                             |
| log_syslog_include_pid                  | ON                                                 |
| log_syslog_tag                          |                                                    |
| log_throttle_queries_not_using_indexes  | 0                                                  |
| log_timestamps                          | UTC                                                |
| log_warnings                            | 2                                                  |
| max_binlog_cache_size                   | 18446744073709547520                               |
| max_binlog_size                         | 104857600                                          |
| max_binlog_stmt_cache_size              | 18446744073709547520                               |
| max_relay_log_size                      | 0                                                  |
| relay_log                               |                                                    |
| relay_log_basename                      | /var/lib/mysql/manobo-service-user-relay-bin       |
| relay_log_index                         | /var/lib/mysql/manobo-service-user-relay-bin.index |
| relay_log_info_file                     | relay-log.info                                     |
| relay_log_info_repository               | FILE                                               |
| relay_log_purge                         | ON                                                 |
| relay_log_recovery                      | OFF                                                |
| relay_log_space_limit                   | 0                                                  |
| slow_query_log                          | OFF                                                |
| slow_query_log_file                     | /var/lib/mysql/manobo-service-user-slow.log        |
| sql_log_bin                             | ON                                                 |
| sql_log_off                             | OFF                                                |
| sync_binlog                             | 1                                                  |
| sync_relay_log                          | 10000                                              |
| sync_relay_log_info                     | 10000                                              |
+-----------------------------------------+----------------------------------------------------+

apt list --installed mysql-server -a

Listing... Done
mysql-server/xenial-updates,xenial-security,now 5.7.20-0ubuntu0.16.04.1 all [installed]
mysql-server/xenial 5.7.11-0ubuntu6 all

./mysqltuner.pl -V

 >>  MySQLTuner 1.7.4 - Major Hayden <major@mhtx.net>
 >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
 >>  Run with '--help' for additional options and output filtering
[OK] You have the latest version of MySQLTuner(1.7.4)
Kyslik commented 6 years ago

Who are you running the script as?

marulitua commented 6 years ago

root user

jmrenouard commented 6 years ago

Hi

There is several issue about that. On Centos 7, systemctl is taking relay and log_error is no longer used.

journalctl -o cat -u mysql

journalctl -o cat -u mariadb

So, there is a lot of configuration settings.

Help needed on this subject.

jmrenouard commented 6 years ago

Hi @marulitua

Your error log is here: /var/log/mysql/error.log

Can you have a look at last version (1.7.12) ?

Are you sure you are running mysqltuner.pl as root (UNIX account) ?

Thnaks for your feedback.

jmrenouard commented 5 years ago

No anwser, I close this issue.

Feel free to reopen it if needed.