From 2c6bdbb0db4864718f97e481bd680da17de468bc Mon Sep 17 00:00:00 2001 From: Jean-Marie Renouard Date: Tue, 6 Feb 2024 19:03:13 +0100 Subject: [PATCH 1/3] Updates README + # 747 --- README.md | 69 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 53 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 5c823aea7..177fc48ef 100644 --- a/README.md +++ b/README.md @@ -41,19 +41,21 @@ Compatibility Test result are available here: [Travis CI/MySQLTuner-perl](https://travis-ci.org/major/MySQLTuner-perl) -* MySQL 8.0 (partial support, password checks don't work) -* Percona Server 8.0 (partial support, password checks don't work) -* MySQL 5.7 (full support) -* Percona Server 5.7 (full support) -* MariaDB 10.3 - 10.11 (full support) +* MySQL 8.0, 8.2, 8.3 (full support) +* Percona Server 8.0, 8.2, 8.3 (full support) +* MariaDB 10.4, 10.5, 10.6, 10.11, 11.0, 11.1, 11.2 (full support) * Galera replication (full support) * Percona XtraDB cluster (full support) * Mysql Replications (partial support, no test environment) +* MySQL 8.1 (not supported, deprecated version) +* Percona Server 5.7 (not supported, deprecated version) +* MySQL 5.7 (not supported, deprecated version) * MySQL 5.6 and earlier (not supported, deprecated version) * Percona Server 5.6 (not supported, deprecated version) +* MariaDB 10.7, 10.8, 10.9, 10.10 (not supported, deprecated version) +* MariaDB 10.3 and earlier (not supported, deprecated version) * MariaDB 5.5 (not supported, deprecated version) -* MariaDB 10.2 and earlier (not supported, deprecated version) ***Windows Support is partial*** @@ -65,17 +67,22 @@ Test result are available here: [Travis CI/MySQLTuner-perl](https://travis-ci.or * Cloud based is not supported at this time (Help wanted! GCP, AWS, Azure support requested) ***Unsupported storage engines: PRs welcome*** +-- * NDB is not supported feel free to create a Pull Request -* MyISAM is too old and no longer active -* RockDB * Archive * Spider * ColummStore -* TokuDB -* XtraDB * Connect +Unmaintenained staff from MySQL or MariaDB: +-- + +* MyISAM is too old and no longer active +* RockDB is not maintained anymore +* TokuDB is not maintained anymore +* XtraDB is not maintained anymore + * CVE vulnerabilities detection support from [https://cve.mitre.org](https://cve.mitre.org) ***MINIMAL REQUIREMENTS*** @@ -143,18 +150,38 @@ cd mysql-sys-master mysql -uroot -p < sys_56.sql ``` -Optional Performance schema and Sysschema installation for MariaDB < 10.6 +Performance schema setup -- -Sysschema is not installed by default under MariaDB prior to 10.6 [MariaDB sys](https://mariadb.com/kb/en/sys-schema/) -By default, on MariaDB, performance schema is disabled by default. consider activating performance schema across your my.cnf configuration file: +By default, on MariaDB, performance schema is disabled by default (MariaDB<10.6). +Consider activating performance schema across your my.cnf configuration file: ```ini -[mysqld] -performance_schema = on + [mysqld] + performance_schema = on + performance-schema-consumer-events-statements-history-long = ON + performance-schema-consumer-events-statements-history = ON + performance-schema-consumer-events-statements-current = ON + performance-schema-consumer-events-stages-current=ON + performance-schema-consumer-events-stages-history=ON + performance-schema-consumer-events-stages-history-long=ON + performance-schema-consumer-events-transactions-current=ON + performance-schema-consumer-events-transactions-history=ON + performance-schema-consumer-events-transactions-history-long=ON + performance-schema-consumer-events-waits-current=ON + performance-schema-consumer-events-waits-history=ON + performance-schema-consumer-events-waits-history-long=ON + performance-schema-instrument='%=ON' + max-digest-length=2048 + performance-schema-max-digest-length=2018 ``` +Sysschema installation for MariaDB < 10.6 +-- + +Sysschema is not installed by default under MariaDB prior to 10.6 [MariaDB sys](https://mariadb.com/kb/en/sys-schema/) + You can follow this command to create a new database sys containing a useful view on Performance schema: ```bash @@ -167,13 +194,23 @@ mysql -u root -p < ./sys_10.sql ``` Errors & solutions for performance schema installation +-- + +ERROR 1054 (42S22) at line 78 in file: './views/p_s/metrics_56.sql': Unknown column 'STATUS' in 'field list' + +This error can be safely ignored +Consider using a recent MySQL/MariaDB version to avoid this kind of issue during sysschema installation + +In recent versions, sysschema is installed and integrated by default as sys schema (SHOW DATABASES) + +-- ERROR at line 21: Failed to open file './tables/sys_config_data_10.sql -- ported', error: 2 Have a look at #452 solution given by @ericx Fixing sysctl configuration (/etc/sysctl.conf) --- +-- It is a system wide setting and not a database setting: [Linux FS Kernel settings](https://www.kernel.org/doc/html/latest/admin-guide/sysctl/fs.html#id1) You can check its values via: From c1d00b994aefce435cc9b1473d037904fb4f977b Mon Sep 17 00:00:00 2001 From: Jean-Marie Renouard Date: Tue, 6 Feb 2024 19:07:08 +0100 Subject: [PATCH 2/3] Format fixing --- README.md | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 177fc48ef..6d4054697 100644 --- a/README.md +++ b/README.md @@ -153,28 +153,30 @@ mysql -uroot -p < sys_56.sql Performance schema setup -- +By default, performance_schema is enabled and sysschema is installed on latest version. By default, on MariaDB, performance schema is disabled by default (MariaDB<10.6). + Consider activating performance schema across your my.cnf configuration file: ```ini - [mysqld] - performance_schema = on - performance-schema-consumer-events-statements-history-long = ON - performance-schema-consumer-events-statements-history = ON - performance-schema-consumer-events-statements-current = ON - performance-schema-consumer-events-stages-current=ON - performance-schema-consumer-events-stages-history=ON - performance-schema-consumer-events-stages-history-long=ON - performance-schema-consumer-events-transactions-current=ON - performance-schema-consumer-events-transactions-history=ON - performance-schema-consumer-events-transactions-history-long=ON - performance-schema-consumer-events-waits-current=ON - performance-schema-consumer-events-waits-history=ON - performance-schema-consumer-events-waits-history-long=ON - performance-schema-instrument='%=ON' - max-digest-length=2048 - performance-schema-max-digest-length=2018 +[mysqld] +performance_schema = on +performance-schema-consumer-events-statements-history-long = ON +performance-schema-consumer-events-statements-history = ON +performance-schema-consumer-events-statements-current = ON +performance-schema-consumer-events-stages-current=ON +performance-schema-consumer-events-stages-history=ON +performance-schema-consumer-events-stages-history-long=ON +performance-schema-consumer-events-transactions-current=ON +performance-schema-consumer-events-transactions-history=ON +performance-schema-consumer-events-transactions-history-long=ON +performance-schema-consumer-events-waits-current=ON +performance-schema-consumer-events-waits-history=ON +performance-schema-consumer-events-waits-history-long=ON +performance-schema-instrument='%=ON' +max-digest-length=2048 +performance-schema-max-digest-length=2018 ``` Sysschema installation for MariaDB < 10.6 @@ -196,17 +198,21 @@ mysql -u root -p < ./sys_10.sql Errors & solutions for performance schema installation -- + ERROR 1054 (42S22) at line 78 in file: './views/p_s/metrics_56.sql': Unknown column 'STATUS' in 'field list' +-- + This error can be safely ignored Consider using a recent MySQL/MariaDB version to avoid this kind of issue during sysschema installation In recent versions, sysschema is installed and integrated by default as sys schema (SHOW DATABASES) --- + ERROR at line 21: Failed to open file './tables/sys_config_data_10.sql -- ported', error: 2 Have a look at #452 solution given by @ericx +-- Fixing sysctl configuration (/etc/sysctl.conf) From cf4e6b47b78c95fbf6e78a91aadc07cd5fd10153 Mon Sep 17 00:00:00 2001 From: Jean-Marie Renouard Date: Tue, 6 Feb 2024 19:12:28 +0100 Subject: [PATCH 3/3] Adding informations about csv dump options --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 6d4054697..cd7c12ebb 100644 --- a/README.md +++ b/README.md @@ -295,6 +295,14 @@ perl mysqltuner.pl --silent --reportfile /tmp/result_mysqltuner.txt --template=/ __Important__: [Text::Template](https://metacpan.org/pod/Text::Template) module is mandatory for `--reportfile` and/or `--template` options, because this module is needed to generate appropriate output based on a text template. + +__Usage:__ Dumping all information_schema and sysschema views as csv file into results subdirectory + +```bash +perl mysqltuner.pl --verbose --dumpdir=./result +``` + + __Usage:__ Enable debugging information ```bash