Compare commits
No commits in common. "master" and "1.7.21" have entirely different histories.
1096 changed files with 2808 additions and 14201 deletions
|
@ -1,6 +0,0 @@
|
||||||
*.md
|
|
||||||
build/**
|
|
||||||
Makefile
|
|
||||||
.perltidy
|
|
||||||
*.json
|
|
||||||
*.png
|
|
74
.github/workflows/generate_mariadb_examples.yml
vendored
74
.github/workflows/generate_mariadb_examples.yml
vendored
|
@ -1,74 +0,0 @@
|
||||||
# This is a basic workflow to help you get started with Actions
|
|
||||||
|
|
||||||
name: Compile MT examples for MariaDB
|
|
||||||
|
|
||||||
# Controls when the workflow will run
|
|
||||||
on:
|
|
||||||
# Allows you to run this workflow manually from the Actions tab
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
||||||
jobs:
|
|
||||||
mysql_examples:
|
|
||||||
# This workflow contains a single job called "build"
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
MARIADB_VERSION: [10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9]
|
|
||||||
# The type of runner that the job will run on
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
||||||
steps:
|
|
||||||
- name: Setup MySQL Tuner repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up MySQL
|
|
||||||
uses: shogo82148/actions-setup-mysql@v1
|
|
||||||
with:
|
|
||||||
distribution: 'mariadb'
|
|
||||||
root-password: "root"
|
|
||||||
mysql-version: "${{ matrix.MARIADB_VERSION }}"
|
|
||||||
|
|
||||||
- name: Injecting credentials
|
|
||||||
run: |
|
|
||||||
echo -e "[client]\nuser=root\npassword=root\nhost=127.0.0.1\nprotocol=TCP" > $HOME/.my.cnf
|
|
||||||
|
|
||||||
- name: Cloning test_db dataset
|
|
||||||
run: |
|
|
||||||
git clone https://github.com/datacharmer/test_db.git
|
|
||||||
|
|
||||||
- name: Test database is Up and Running
|
|
||||||
run: |
|
|
||||||
sleep 5s
|
|
||||||
sudo netstat -ltpn
|
|
||||||
mysql -e 'select version();'
|
|
||||||
|
|
||||||
- name: Injecting test_db dataset
|
|
||||||
run: |
|
|
||||||
cd test_db
|
|
||||||
mysql -e 'CREATE DATABASE data;'
|
|
||||||
mysql data< ./employees.sql
|
|
||||||
cd -
|
|
||||||
rm -rf test_db
|
|
||||||
# Runs a single command using the runners shell
|
|
||||||
- name: Json Run verbose mode with dumpdir result
|
|
||||||
run: |
|
|
||||||
mkdir -p ./examples/github/result/mariadb/${{ matrix.MARIADB_VERSION }}
|
|
||||||
sudo perl ./mysqltuner.pl --user=root --pass=root --protocol tcp --verbose --dumpdir=./examples/github/result/mariadb/${{ matrix.MARIADB_VERSION }} --json | tee -a ./examples/github/result/mariadb/${{ matrix.MARIADB_VERSION }}/result.json
|
|
||||||
|
|
||||||
- name: Standard Run verbose mode without dumpdir result
|
|
||||||
run: |
|
|
||||||
sudo perl ./mysqltuner.pl --user=root --pass=root --protocol tcp --verbose | tee -a ./examples/github/result/mariadb/${{ matrix.MARIADB_VERSION }}/result.txt
|
|
||||||
|
|
||||||
- name: Adding examples to Git
|
|
||||||
run: |
|
|
||||||
git add ./examples/github/result/mariadb/${{ matrix.MARIADB_VERSION }}/* || true
|
|
||||||
|
|
||||||
- name: Run the Action Commit
|
|
||||||
uses: devops-infra/action-commit-push@master
|
|
||||||
with:
|
|
||||||
github_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
add_timestamp: true
|
|
||||||
commit_prefix: "[AUTO]"
|
|
||||||
commit_message: "Updates MariaDb result examples (via Actions)"
|
|
||||||
force: false
|
|
||||||
target_branch: examples-mariadb-${{ matrix.MARIADB_VERSION }}
|
|
74
.github/workflows/generate_mysql_examples.yml
vendored
74
.github/workflows/generate_mysql_examples.yml
vendored
|
@ -1,74 +0,0 @@
|
||||||
# This is a basic workflow to help you get started with Actions
|
|
||||||
|
|
||||||
name: Compile MT examples For MySQL
|
|
||||||
|
|
||||||
# Controls when the workflow will run
|
|
||||||
on:
|
|
||||||
# Allows you to run this workflow manually from the Actions tab
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
||||||
jobs:
|
|
||||||
mysql_examples:
|
|
||||||
# This workflow contains a single job called "build"
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
MYSQL_VERSION: [5.6, 5.7, 8.0]
|
|
||||||
# The type of runner that the job will run on
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
||||||
steps:
|
|
||||||
- name: Setup MySQL Tuner repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up MySQL
|
|
||||||
uses: shogo82148/actions-setup-mysql@v1
|
|
||||||
with:
|
|
||||||
distribution: 'mysql'
|
|
||||||
root-password: "root"
|
|
||||||
mysql-version: "${{ matrix.MYSQL_VERSION }}"
|
|
||||||
|
|
||||||
- name: Injecting credentials
|
|
||||||
run: |
|
|
||||||
echo -e "[client]\nuser=root\npassword=root\nhost=127.0.0.1\nprotocol=TCP" > $HOME/.my.cnf
|
|
||||||
|
|
||||||
- name: Cloning test_db dataset
|
|
||||||
run: |
|
|
||||||
git clone https://github.com/datacharmer/test_db.git
|
|
||||||
|
|
||||||
- name: Test database is Up and Running
|
|
||||||
run: |
|
|
||||||
sleep 5s
|
|
||||||
sudo netstat -ltpn
|
|
||||||
mysql -e 'select version();'
|
|
||||||
|
|
||||||
- name: Injecting test_db dataset
|
|
||||||
run: |
|
|
||||||
cd test_db
|
|
||||||
mysql -e 'CREATE DATABASE data;'
|
|
||||||
mysql data< ./employees.sql
|
|
||||||
cd -
|
|
||||||
rm -rf test_db
|
|
||||||
# Runs a single command using the runners shell
|
|
||||||
- name: Json Run verbose mode with dumpdir result
|
|
||||||
run: |
|
|
||||||
mkdir -p ./examples/github/result/mysql/${{ matrix.MYSQL_VERSION }}
|
|
||||||
sudo perl ./mysqltuner.pl --user=root --pass=root --protocol tcp --verbose --dumpdir=./examples/github/result/mysql/${{ matrix.MYSQL_VERSION }} --json | tee -a ./examples/github/result/mysql/${{ matrix.MYSQL_VERSION }}/result.json
|
|
||||||
|
|
||||||
- name: Standard Run verbose mode without dumpdir result
|
|
||||||
run: |
|
|
||||||
sudo perl ./mysqltuner.pl --user=root --pass=root --protocol tcp --verbose | tee -a ./examples/github/result/mysql/${{ matrix.MYSQL_VERSION }}/result.txt
|
|
||||||
|
|
||||||
- name: Adding examples to Git
|
|
||||||
run: |
|
|
||||||
git add ./examples/github/result/mysql/${{ matrix.MYSQL_VERSION }}/* || true
|
|
||||||
|
|
||||||
- name: Run the Action Commit
|
|
||||||
uses: devops-infra/action-commit-push@master
|
|
||||||
with:
|
|
||||||
github_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
add_timestamp: true
|
|
||||||
commit_prefix: "[AUTO]"
|
|
||||||
commit_message: "Updates MySQL result examples (via Actions)"
|
|
||||||
force: false
|
|
||||||
target_branch: examples-mysql-${{ matrix.MYSQL_VERSION }}
|
|
41
.github/workflows/publish_release.yml
vendored
41
.github/workflows/publish_release.yml
vendored
|
@ -1,41 +0,0 @@
|
||||||
on:
|
|
||||||
push:
|
|
||||||
# Sequence of patterns matched against refs/tags
|
|
||||||
tags:
|
|
||||||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
|
||||||
|
|
||||||
name: Create Release
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Create Release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Create release
|
|
||||||
id: create_release
|
|
||||||
uses: actions/create-release@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
|
|
||||||
with:
|
|
||||||
tag_name: ${{ github.ref }}
|
|
||||||
release_name: Release ${{ github.ref }}
|
|
||||||
body: |
|
|
||||||
Changes in this Release:
|
|
||||||
Please consult commit log and issue tracker on Github for more information.
|
|
||||||
draft: true
|
|
||||||
prerelease: false
|
|
||||||
- name: Upload release asset
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_content_type: application/zip
|
|
||||||
- name: Publish release
|
|
||||||
uses: StuYarrow/publish-release@v1.1.2
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
id: ${{ steps.create_release.outputs.id }}
|
|
77
.github/workflows/pull_request.yml
vendored
77
.github/workflows/pull_request.yml
vendored
|
@ -1,77 +0,0 @@
|
||||||
# This is a basic workflow to help you get started with Actions
|
|
||||||
|
|
||||||
name: CI for MySQL Tuner for MySQL 5.7 and 8.0
|
|
||||||
|
|
||||||
# Controls when the workflow will run
|
|
||||||
on:
|
|
||||||
# Triggers the workflow on push or pull request events but only for the master branch
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
# Allows you to run this workflow manually from the Actions tab
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
||||||
jobs:
|
|
||||||
# This workflow contains a single job called "build"
|
|
||||||
test_help:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
MYSQL_VERSION: [5.7, 8.0]
|
|
||||||
# The type of runner that the job will run on
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
||||||
steps:
|
|
||||||
- name: Setup MySQL Tuner repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up MySQL
|
|
||||||
uses: mirromutth/mysql-action@v1.1
|
|
||||||
with:
|
|
||||||
mysql root password: "root"
|
|
||||||
mysql version: "${{ matrix.MYSQL_VERSION }}"
|
|
||||||
|
|
||||||
- name: Injecting credentials
|
|
||||||
run: |
|
|
||||||
echo -e "[client]\nuser=root\npassword=root\nhost=127.0.0.1\nprotocol=TCP" > $HOME/.my.cnf
|
|
||||||
|
|
||||||
- name: waiting database
|
|
||||||
run: |
|
|
||||||
sleep 20s
|
|
||||||
|
|
||||||
- name: Run help mode
|
|
||||||
run: |
|
|
||||||
sudo perl ./mysqltuner.pl --help
|
|
||||||
|
|
||||||
test_with_empty_db:
|
|
||||||
needs: test_help
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
MYSQL_VERSION: [5.7, 8.0]
|
|
||||||
# The type of runner that the job will run on
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
||||||
steps:
|
|
||||||
- name: Setup MySQL Tuner repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up MySQL
|
|
||||||
uses: mirromutth/mysql-action@v1.1
|
|
||||||
with:
|
|
||||||
mysql root password: "root"
|
|
||||||
mysql version: "${{ matrix.MYSQL_VERSION }}"
|
|
||||||
|
|
||||||
- name: Injecting credentials
|
|
||||||
run: |
|
|
||||||
echo -e "[client]\nuser=root\npassword=root\nhost=127.0.0.1\nprotocol=TCP" > $HOME/.my.cnf
|
|
||||||
|
|
||||||
- name: waiting database
|
|
||||||
run: |
|
|
||||||
sleep 20s
|
|
||||||
|
|
||||||
# Runs a single command using the runners shell
|
|
||||||
- name: Run verbose mode
|
|
||||||
run: sudo perl ./mysqltuner.pl --user=root --pass=root --protocol tcp --verbose
|
|
56
.github/workflows/run_mt_with_db.yml
vendored
56
.github/workflows/run_mt_with_db.yml
vendored
|
@ -1,56 +0,0 @@
|
||||||
# This is a basic workflow to help you get started with Actions
|
|
||||||
|
|
||||||
name: Test with databases
|
|
||||||
|
|
||||||
# Controls when the workflow will run
|
|
||||||
on:
|
|
||||||
# Allows you to run this workflow manually from the Actions tab
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
||||||
jobs:
|
|
||||||
# This workflow contains a single job called "build"
|
|
||||||
run_mt_with_db:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
MYSQL_VERSION: [5.7, 8.0]
|
|
||||||
# The type of runner that the job will run on
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
||||||
steps:
|
|
||||||
- name: Setup MySQL Tuner repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up MySQL
|
|
||||||
uses: mirromutth/mysql-action@v1.1
|
|
||||||
with:
|
|
||||||
mysql root password: "root"
|
|
||||||
mysql version: "${{ matrix.MYSQL_VERSION }}"
|
|
||||||
|
|
||||||
- name: Injecting credentials
|
|
||||||
run: |
|
|
||||||
echo -e "[client]\nuser=root\npassword=root\nhost=127.0.0.1\nprotocol=TCP" > $HOME/.my.cnf
|
|
||||||
|
|
||||||
- name: Cloning test_db dataset
|
|
||||||
run: |
|
|
||||||
git clone https://github.com/datacharmer/test_db.git
|
|
||||||
|
|
||||||
- name: Injecting test_db dataset
|
|
||||||
run: |
|
|
||||||
sleep 5s
|
|
||||||
cd test_db
|
|
||||||
netstat -ltpn
|
|
||||||
mysql -e 'select version();'
|
|
||||||
mysql -e 'CREATE DATABASE data;'
|
|
||||||
mysql data< ./employees.sql
|
|
||||||
cd -
|
|
||||||
rm -rf test_db
|
|
||||||
|
|
||||||
# Runs a single command using the runners shell
|
|
||||||
- name: Run help mode
|
|
||||||
run: perl ./mysqltuner.pl --help
|
|
||||||
|
|
||||||
# Runs a single command using the runners shell
|
|
||||||
- name: Run verbose mode
|
|
||||||
run: sudo perl ./mysqltuner.pl --user=root --pass=root --protocol tcp --verbose
|
|
48
.github/workflows/update_cve_and_docs.yml
vendored
48
.github/workflows/update_cve_and_docs.yml
vendored
|
@ -1,48 +0,0 @@
|
||||||
# This is a basic workflow to help you get started with Actions
|
|
||||||
|
|
||||||
name: CVE and Docs update
|
|
||||||
|
|
||||||
# Controls when the workflow will run
|
|
||||||
on:
|
|
||||||
# Scheudle every sunday at 00:00
|
|
||||||
#schedule:
|
|
||||||
# - cron: '0 0 * * 0'
|
|
||||||
|
|
||||||
# Allows you to run this workflow manually from the Actions tab
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
||||||
jobs:
|
|
||||||
# This workflow contains a single job called "build"
|
|
||||||
build:
|
|
||||||
# The type of runner that the job will run on
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
||||||
steps:
|
|
||||||
- name: Setup MySQL Tuner repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
pwd
|
|
||||||
cd build
|
|
||||||
pwd
|
|
||||||
sudo bash ./installStaff.sh
|
|
||||||
|
|
||||||
- name: Update CVE and docs
|
|
||||||
run: |
|
|
||||||
pwd
|
|
||||||
cd ./build
|
|
||||||
pwd
|
|
||||||
sudo bash ./updateStaff.sh
|
|
||||||
|
|
||||||
- name: Run the Action
|
|
||||||
uses: devops-infra/action-commit-push@master
|
|
||||||
with:
|
|
||||||
github_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
add_timestamp: true
|
|
||||||
commit_prefix: "[AUTO]"
|
|
||||||
commit_message: "Updates CVE and docs (via Actions)"
|
|
||||||
force: false
|
|
||||||
target_branch: "cve-docs"
|
|
11
.gitignore
vendored
11
.gitignore
vendored
|
@ -9,14 +9,3 @@ Vagrant/data
|
||||||
Vagrant/.vagrant
|
Vagrant/.vagrant
|
||||||
contents
|
contents
|
||||||
contents/*
|
contents/*
|
||||||
reports_*
|
|
||||||
golang/prog-*
|
|
||||||
.vscode
|
|
||||||
test_db/**
|
|
||||||
result*
|
|
||||||
result_*
|
|
||||||
sql/*.sql
|
|
||||||
sql/*.csv
|
|
||||||
cve.csv
|
|
||||||
default*.cnf
|
|
||||||
.env
|
|
54
.travis.yml
Normal file
54
.travis.yml
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
language: perl
|
||||||
|
perl:
|
||||||
|
- "5.24"
|
||||||
|
|
||||||
|
os: linux
|
||||||
|
dist: focal
|
||||||
|
|
||||||
|
services:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
env:
|
||||||
|
- DB=mariadb:5.5
|
||||||
|
- DB=mariadb:10.2
|
||||||
|
- DB=mariadb:10.3
|
||||||
|
- DB=mariadb:10.4
|
||||||
|
- DB=mariadb:10.5
|
||||||
|
- DB=mysql:5.5
|
||||||
|
- DB=mysql:5.7
|
||||||
|
- DB=mysql:8.0
|
||||||
|
- DB=percona:5.6
|
||||||
|
- DB=percona:5.7
|
||||||
|
- DB=percona:8.0
|
||||||
|
|
||||||
|
install:
|
||||||
|
- cpanm --quiet --notest Data::Dumper
|
||||||
|
- cpanm --quiet --notest JSON
|
||||||
|
- cpanm --quiet --notest Perl::Critic
|
||||||
|
- cpanm --quiet --notest Text::Template
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- mysql --version
|
||||||
|
- mysqladmin --version
|
||||||
|
- docker run -it --name=mysqltestinstance -d -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -p 3306:3306 ${DB}
|
||||||
|
- echo -e "[client]\nuser=root\npassword=\"\"\nhost=127.0.0.1" > ~/.my.cnf
|
||||||
|
- chmod 600 ~/.my.cnf
|
||||||
|
- git clone https://github.com/datacharmer/test_db.git
|
||||||
|
- cd test_db
|
||||||
|
- count=10
|
||||||
|
- while ! mysql -e 'select version()' && [ $count -gt 0 ]; do echo $count seconds to go; sleep 1; count=$(( $count - 1 )); done
|
||||||
|
- if [[ $DB =~ .*:8.0 ]] ; then
|
||||||
|
for file in public_key.pem ca.pem server-cert.pem client-key.pem client-cert.pem ; do
|
||||||
|
docker cp mysqltestinstance:/var/lib/mysql/$file "${HOME}" ;
|
||||||
|
done ;
|
||||||
|
fi
|
||||||
|
- "cat employees.sql | grep -v 'storage_engine' | mysql"
|
||||||
|
- cd ..
|
||||||
|
|
||||||
|
script:
|
||||||
|
- ./mysqltuner.pl --verbose --tbstat 2>stderr.txt | tee -a "stdout.txt"
|
||||||
|
|
||||||
|
after_script:
|
||||||
|
- docker stop mysqltestinstance
|
||||||
|
- echo "Standard Output: $(cat stdout.txt)"
|
||||||
|
- echo "Standard Error : $(cat stderr.txt)"
|
|
@ -127,7 +127,7 @@ these guidelines is the best way to get your work included in MySQLTuner.
|
||||||
<a name="git-flow"></a>
|
<a name="git-flow"></a>
|
||||||
#### Git Flow for pull requests
|
#### Git Flow for pull requests
|
||||||
|
|
||||||
1. [Fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) the project, clone your fork,
|
1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork,
|
||||||
and configure the remotes:
|
and configure the remotes:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
2.5.4
|
|
31
Dockerfile
31
Dockerfile
|
@ -1,31 +0,0 @@
|
||||||
FROM ubuntu:latest
|
|
||||||
|
|
||||||
LABEL maintainer="jmrenouard@gmail.com"
|
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
|
||||||
|
|
||||||
RUN apt-get update && apt upgrade -y && apt-get install -yq --no-install-recommends \
|
|
||||||
apt-utils \
|
|
||||||
curl \
|
|
||||||
wget \
|
|
||||||
perl \
|
|
||||||
perl-doc \
|
|
||||||
mysql-client \
|
|
||||||
libjson-perl \
|
|
||||||
libtext-template-perl \
|
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
|
||||||
&& mkdir -p /results
|
|
||||||
RUN apt clean all
|
|
||||||
WORKDIR /
|
|
||||||
COPY ./mysqltuner.pl /mysqltuner.pl
|
|
||||||
COPY ./vulnerabilities.csv /vulnerabilities.txt
|
|
||||||
COPY ./basic_passwords.txt /basic_passwords.txt
|
|
||||||
COPY ./template_example.tpl /template.tpl
|
|
||||||
|
|
||||||
ENTRYPOINT [ "perl", "/mysqltuner.pl", "--passwordfile", "/basic_passwords.txt",\
|
|
||||||
"--cvefile", "/vulnerabilities.txt", "--nosysstat", "--defaults-file", \
|
|
||||||
"/defaults.cnf", "--dumpdir", "/results", "--outputfile", \
|
|
||||||
"/results/mysqltuner.txt", "--template", "/template.tpl", \
|
|
||||||
"--reportfile", "/results/mysqltuner.html" ]
|
|
||||||
CMD ["--verbose" ]
|
|
31
FEATURES.md
31
FEATURES.md
|
@ -1,31 +0,0 @@
|
||||||
Features list for option: --feature (dev only)
|
|
||||||
---
|
|
||||||
|
|
||||||
|
|
||||||
* cve_recommendations
|
|
||||||
* log_file_recommendations
|
|
||||||
* make_recommendations
|
|
||||||
* mariadb_aria
|
|
||||||
* mariadb_connect
|
|
||||||
* mariadb_galera
|
|
||||||
* mariadb_rockdb
|
|
||||||
* mariadb_spider
|
|
||||||
* mariadb_threadpool
|
|
||||||
* mariadb_tokudb
|
|
||||||
* mariadb_xtradb
|
|
||||||
* mysql_databases
|
|
||||||
* mysql_indexes
|
|
||||||
* mysql_innodb
|
|
||||||
* mysql_myisam
|
|
||||||
* mysql_pfs
|
|
||||||
* mysql_routines
|
|
||||||
* mysql_setup
|
|
||||||
* mysql_stats
|
|
||||||
* mysql_table_structures
|
|
||||||
* mysql_tables
|
|
||||||
* mysql_triggers
|
|
||||||
* mysql_views
|
|
||||||
* security_recommendations
|
|
||||||
* system_recommendations
|
|
||||||
* validate_mysql_version
|
|
||||||
* validate_tuner_version
|
|
841
INTERNALS.md
841
INTERNALS.md
|
@ -1,424 +1,417 @@
|
||||||
## MySQLTuner Internals
|
## MySQLTuner Internals
|
||||||
|
|
||||||
[](https://www.buymeacoffee.com/jmrenouard)
|
## Table of contents
|
||||||
## Table of contents
|
|
||||||
|
* [MySQLTuner steps](#mysqltuner-steps)
|
||||||
- [MySQLTuner Internals](#mysqltuner-internals)
|
* [Get login information steps](#mysqltuner-get-login-information-steps)
|
||||||
- [Table of contents](#table-of-contents)
|
* [System checks](#mysqltuner-system-checks)
|
||||||
- [MySQLTuner steps](#mysqltuner-steps)
|
* [Server version checks](#mysqltuner-server-version-checks)
|
||||||
- [MySQLTuner get login information steps](#mysqltuner-get-login-information-steps)
|
* [Error log file checks](#mysql-error-log-file-analysis)
|
||||||
- [MySQLTuner system checks](#mysqltuner-system-checks)
|
* [MySQL Storage engine general information](#mysql-storage-engine-general-information)
|
||||||
- [MySQLTuner Server version checks](#mysqltuner-server-version-checks)
|
* [Security checks](#mysqltuner-security-checks)
|
||||||
- [Mysql error log file analysis](#mysql-error-log-file-analysis)
|
* [CVE checks](#mysqltuner-cve-checks)
|
||||||
- [MySQL Storage engine general information](#mysql-storage-engine-general-information)
|
* [Database information](#mysqltuner-database-information)
|
||||||
- [MySQLTuner security checks](#mysqltuner-security-checks)
|
* [Index information](#mysqltuner-index-information)
|
||||||
- [MySQLTuner CVE vulnerabilities detection](#mysqltuner-cve-vulnerabilities-detection)
|
* [Connections information](#mysqltuner-connections-information)
|
||||||
- [MySQLTuner database information](#mysqltuner-database-information)
|
* [Server information](#mysqltuner-server-information)
|
||||||
- [MySQLTuner index information](#mysqltuner-index-information)
|
* [Sort, join and temp table information](#mysqltuner-sort-join-and-temp-table-information)
|
||||||
- [MySQLTuner Connections information](#mysqltuner-connections-information)
|
* [Global buffer information](#mysqltuner-global-buffer-information)
|
||||||
- [MySQLTuner server information](#mysqltuner-server-information)
|
* [Query cache checks](#mysqltuner-query-cache-checks)
|
||||||
- [MySQLTuner sort, join and temp table information](#mysqltuner-sort-join-and-temp-table-information)
|
* [Slow queries checks](#mysqltuner-slow-queries-checks)
|
||||||
- [MySQLTuner global buffer information](#mysqltuner-global-buffer-information)
|
* [ThreadPool information](#mysqltuner-threadpool-information)
|
||||||
- [MySQLTuner query cache checks](#mysqltuner-query-cache-checks)
|
* [Replication checks](#mysqltuner-replication-checks)
|
||||||
- [MySQLTuner memory checks](#mysqltuner-memory-checks)
|
* [InnoDB information](#mysqltuner-innodb-information)
|
||||||
- [MySQLTuner slow queries checks](#mysqltuner-slow-queries-checks)
|
* [MYISAM information](#mysqltuner-myisam-information)
|
||||||
- [MySQLTuner replication checks](#mysqltuner-replication-checks)
|
* [ARIADB information](#mysqltuner-ariadb-information)
|
||||||
- [MySQLTuner InnoDB information](#mysqltuner-innodb-information)
|
* [XTRADB information](#mysqltuner-xtradb-information)
|
||||||
- [MySQLTuner ARIADB information](#mysqltuner-ariadb-information)
|
* [TOKUDB information](#mysqltuner-tokudb-information)
|
||||||
- [MySQLTuner MYISAM information](#mysqltuner-myisam-information)
|
* [ROCKDB information](#mysqltuner-rockdb-information)
|
||||||
- [MySQLTuner Galera information](#mysqltuner-galera-information)
|
* [CONNECT information](#mysqltuner-connect-information)
|
||||||
- [MySQLTuner TokuDB information](#mysqltuner-tokudb-information)
|
* [SPIDER information](#mysqltuner-spider-information)
|
||||||
- [MySQLTuner XtraDB information](#mysqltuner-xtradb-information)
|
* [GALERA information](#mysqltuner-galera-information)
|
||||||
- [MySQLTuner Connect information](#mysqltuner-connect-information)
|
* [Performance Schema information](#mysqltuner-performance-schema-and-sysschema-information)
|
||||||
- [MySQLTuner Spider information](#mysqltuner-spider-information)
|
|
||||||
- [MySQLTuner RocksDb information](#mysqltuner-rocksdb-information)
|
## MySQLTuner steps
|
||||||
- [MySQLTuner Thread pool information](#mysqltuner-thread-pool-information)
|
|
||||||
- [MySQLTuner performance schema and sysschema information](#mysqltuner-performance-schema-and-sysschema-information)
|
* Header Print
|
||||||
|
* Get login information
|
||||||
## MySQLTuner steps
|
* Set up some OS variables
|
||||||
|
* Toss variables/status into hashes
|
||||||
* Header Print
|
* Get information about the tuning connexion
|
||||||
* Get login information
|
* Check current MySQL version
|
||||||
* Set up some OS variables
|
* Suggest 64-bit upgrade
|
||||||
* Toss variables/status into hashes
|
* Analyze mysqld error log file
|
||||||
* Get information about the tuning connection
|
* Show enabled storage engines
|
||||||
* Check current MySQL version
|
* Show informations about databases (option: --dbstat)
|
||||||
* Suggest 64-bit upgrade
|
* Show informations about indexes (option: --idxstat)
|
||||||
* Analyze mysqld error log file
|
* Display some security recommendations
|
||||||
* Show enabled storage engines
|
* Calculate everything we need
|
||||||
* Show informations about databases (option: --dbstat)
|
* Print the server stats
|
||||||
* Show informations about indexes (option: --idxstat)
|
* Print MyISAM stats
|
||||||
* Display some security recommendations
|
* Print InnoDB stats
|
||||||
* Calculate everything we need
|
* Print AriaDB stats
|
||||||
* Print the server stats
|
* Print replication info
|
||||||
* Print MyISAM stats
|
* Make recommendations based on stats
|
||||||
* Print InnoDB stats
|
* Close reportfile if needed
|
||||||
* Print AriaDB stats
|
* Dump result if debug is on
|
||||||
* Print replication info
|
|
||||||
* Make recommendations based on stats
|
## MySQLTuner get login information steps
|
||||||
* Close reportfile if needed
|
|
||||||
* Dump result if debug is on
|
* Is a login possible?
|
||||||
|
* Force socket?
|
||||||
## MySQLTuner get login information steps
|
* Remote connection?
|
||||||
|
* _Specifying available RAM is required_
|
||||||
* Is a login possible?
|
* Got user/pass on command line?
|
||||||
* Force socket?
|
* mysql-quickbackup credentials available?
|
||||||
* Remote connection?
|
* Plesk credentials available?
|
||||||
* _Specifying available RAM is required_
|
* DirectAdmin credentials available?
|
||||||
* Got user/pass on command line?
|
* Debian maintenance account credentials available?
|
||||||
* mysql-quickbackup credentials available?
|
* Just try a login
|
||||||
* Plesk credentials available?
|
* If working, and .my.cnf isn't there, **WARNING**
|
||||||
* DirectAdmin credentials available?
|
* If working, and .my.cnf is there, okay
|
||||||
* Debian maintenance account credentials available?
|
* Prompt for creds on the console
|
||||||
* Just try a login
|
|
||||||
* If working, and .my.cnf isn't there, **WARNING**
|
## MySQLTuner system checks
|
||||||
* If working, and .my.cnf is there, okay
|
* 32-bit w/>2GB RAM check
|
||||||
* Prompt for creds on the console
|
* Check number of opened ports (warning if more than 9 ports opened)
|
||||||
|
* Check 80, 8080, 443 and 8443 ports if warning are raised if there are opened
|
||||||
## MySQLTuner system checks
|
* Check if some banned ports are not opened (option --bannedports separated by comma)
|
||||||
* Check whether more than 2GB RAM present if on 32-bit OS
|
* Check if non kernel and user process except mysqld are not using more than 15% of total physical memory)
|
||||||
* Check number of opened ports (warn when more than 9 ports opened)
|
* Check vm.swapiness
|
||||||
* Check 80, 8080, 443 and 8443 ports if warning is raised if they are opened
|
* Check /etc/security/limit.conf
|
||||||
* Check if some banned ports are not opened (option --bannedports separated by comma)
|
* Check sysctl entries: sunrpc.tcp_slot_entries, vm.swappiness, fs.aio-fs-nr
|
||||||
* Check if non kernel and user process except mysqld are not using more than 15% of total physical memory
|
* Check mount point
|
||||||
* Check vm.swapiness
|
* Check Ethernet card
|
||||||
* Check /etc/security/limit.conf
|
* Check load average
|
||||||
* Check sysctl entries: sunrpc.tcp_slot_entries, vm.swappiness, fs.aio-fs-nr
|
|
||||||
* Check mount point
|
## MySQLTuner Server version checks
|
||||||
* Check Ethernet card
|
* EOL MySQL version check
|
||||||
* Check load average
|
* Currently MySQL < 5.1 are EOF considered.
|
||||||
|
* Using 5.5+ version of MySQL for performance issue (asynchronous IO).
|
||||||
## MySQLTuner Server version checks
|
|
||||||
* EOL MySQL version check
|
## Mysql error log file analysis
|
||||||
* Currently MySQL < 5.1 are considered EOL
|
* Look for potential current error log file name
|
||||||
* Using 5.5+ version of MySQL for performance issue (asynchronous IO)
|
* Check permission on error log file
|
||||||
|
* Check size on error log file
|
||||||
## Mysql error log file analysis
|
* Check error and warning on error log file
|
||||||
* Look for potential current error log file name
|
* Find last start and shutdown on error log file
|
||||||
* Check permission on error log file
|
|
||||||
* Check size on error log file
|
## MySQL Storage engine general information
|
||||||
* Check error and warning on error log file
|
|
||||||
* Find last start and shutdown on error log file
|
* Get storage engine counts/stats
|
||||||
|
* Check for DB engines that are enabled but unused
|
||||||
## MySQL Storage engine general information
|
* Look for fragmented tables
|
||||||
|
* Look for auto-increments near capacity
|
||||||
* Get storage engine counts/stats
|
* Look for table with autoincrement with value near max capacity
|
||||||
* Check for DB engines that are enabled but unused
|
|
||||||
* Look for fragmented tables
|
## MySQLTuner security checks
|
||||||
* Look for auto-increments near capacity
|
|
||||||
* Look for tables with auto-increment with value near max capacity
|
* Is anonymous user present?
|
||||||
|
* Users without passwords
|
||||||
## MySQLTuner security checks
|
* Users w/username as password
|
||||||
|
* Users w/o host restriction
|
||||||
* Is anonymous user present?
|
* Weak password check (possibly using cracklib later?)
|
||||||
* Users without passwords
|
* Using basic_passwords.txt as password database
|
||||||
* Users with username as password
|
* Password list checks can be avoid (option: --skippassword)
|
||||||
* Users without host restriction
|
|
||||||
* Weak password check (possibly using cracklib later?)
|
## MySQLTuner CVE vulnerabilities detection
|
||||||
* Using basic_passwords.txt as password database
|
|
||||||
* Password list checks can be avoided (option: --skippassword)
|
* option: --cvefile
|
||||||
|
* Check if your MariaDB or MySQL version contains CVE bulletins.
|
||||||
## MySQLTuner CVE vulnerabilities detection
|
|
||||||
|
## MySQLTuner database information
|
||||||
* option: --cvefile
|
* Performance analysis parameter checks
|
||||||
* Check if your MariaDB or MySQL version contains CVE entries.
|
* Per database information
|
||||||
|
* Tables number
|
||||||
## MySQLTuner database information
|
* Rows number
|
||||||
* Performance analysis parameter checks
|
* Total size
|
||||||
* Per database information
|
* Data size
|
||||||
* Tables number
|
* Percentage of data size
|
||||||
* Rows number
|
* Index size
|
||||||
* Total size
|
* Percentage of index size
|
||||||
* Data size
|
* Collation number
|
||||||
* Percentage of data size
|
* Check that there is only one collation for all table in a database
|
||||||
* Index size
|
* Check that there is only one collation for ll table columns in a database
|
||||||
* Percentage of index size
|
* Check that there is only one storage engine per user database
|
||||||
* Collation number
|
|
||||||
* Check that there is only one collation for all tables in database
|
|
||||||
* Check that there is only one collation for all table columns in database
|
## MySQLTuner index information
|
||||||
* Check that there is only one storage engine per user database
|
|
||||||
|
* Top 10 worth selectivity index
|
||||||
|
* Per index information
|
||||||
## MySQLTuner index information
|
* Index Cardinality
|
||||||
|
* Index Selectivity
|
||||||
* Top 10 worth selectivity index
|
* Misc information about index definition
|
||||||
* Per index information
|
* Misc information about index size
|
||||||
* Index Cardinality
|
|
||||||
* Index Selectivity
|
## MySQLTuner Connections information
|
||||||
* Misc information about index definition
|
|
||||||
* Misc information about index size
|
* Highest usage of available connections
|
||||||
|
* Percentage of used connections (<85%)
|
||||||
## MySQLTuner Connections information
|
* Percentage of aborted connections (<3%)
|
||||||
|
|
||||||
* Highest usage of available connections
|
## MySQLTuner server information
|
||||||
* Percentage of used connections (<85%)
|
|
||||||
* Percentage of aborted connections (<3%)
|
* Uptime: If MySQL started within last 24 hours
|
||||||
|
* Bytes received and sent
|
||||||
## MySQLTuner server information
|
* Number of connections
|
||||||
|
* Percentage between reads and writes
|
||||||
* Uptime: whether MySQL started within last 24 hours
|
* Is binary log activated ?
|
||||||
* Bytes received and sent
|
* Is GTID mode activated ?
|
||||||
* Number of connections
|
|
||||||
* Percentage between reads and writes
|
## MySQLTuner sort, join and temp table information
|
||||||
* Is binary log activated?
|
* Max memory temporary table size allowed.
|
||||||
* Is GTID mode activated?
|
* Percentage of sort using temporary table (<10%)
|
||||||
|
* Number of join performed without using indexes (<250)
|
||||||
## MySQLTuner sort, join and temp table information
|
* Percentage of temporary table written on disk(<25%)
|
||||||
|
* Thread cache (=4)
|
||||||
* Max memory temporary table size allowed.
|
* Thread cache hit ratio (>50%) if thread_handling is different of pools-of-threads
|
||||||
* Percentage of sort using temporary table (<10%)
|
* Table cache hit ratio(>2°%)
|
||||||
* Number of join performed without using indexes (<250)
|
* Table cache definition should be upper that total number of tables or in autoresizing mode
|
||||||
* Percentage of temporary table written on disk (<25%)
|
* Percentage of open file and open file limit(<85%)
|
||||||
* Thread cache (=4)
|
* Percentage of table locks (<95%)
|
||||||
* Thread cache hit ratio (>50%) if thread_handling is different of pools-of-threads
|
* Percentage of binlog cache lock (<90%)
|
||||||
* Table cache hit ratio (>2°%)
|
|
||||||
* Table cache definition should be upper that total number of tables or in autoresizing mode
|
## MySQLTuner global buffer information
|
||||||
* Percentage of open file and open file limit (<85%)
|
|
||||||
* Percentage of table locks (<95%)
|
* Key Buffer
|
||||||
* Percentage of binlog cache lock (<90%)
|
* Max Tmp Table
|
||||||
|
* Per Thread Buffer
|
||||||
## MySQLTuner global buffer information
|
* Read Buffer
|
||||||
|
* Read RND Buffer
|
||||||
* Key Buffer
|
* Sort Buffer
|
||||||
* Max Tmp Table
|
* Thread stack
|
||||||
* Per Thread Buffer
|
* Join Buffer
|
||||||
* Read Buffer
|
* Binlog Cache Buffers size if activated
|
||||||
* Read RND Buffer
|
|
||||||
* Sort Buffer
|
## MySQLTuner query cache checks
|
||||||
* Thread stack
|
|
||||||
* Join Buffer
|
* Is Query cache activated ?
|
||||||
* Binlog Cache Buffers size if activated
|
* Query Cache Buffers
|
||||||
|
* Query Cache DISABLED, ALL REQUEST or ON DEMAND
|
||||||
## MySQLTuner query cache checks
|
* Query Cache Size
|
||||||
|
* Query cache hit ratio (cache efficiency)
|
||||||
* Is Query cache activated?
|
|
||||||
* Query Cache Buffers
|
## MySQLTuner memory checks
|
||||||
* Query Cache DISABLED, ALL REQUEST or ON DEMAND
|
|
||||||
* Query Cache Size
|
* Get total RAM/swap
|
||||||
* Query cache hit ratio (cache efficiency)
|
* Is there enough memory for max connections reached by MySQL ?
|
||||||
|
* Is there enough memory for max connections allowed by MySQL ?
|
||||||
## MySQLTuner memory checks
|
* Max percentage of memory used(<85%)
|
||||||
|
|
||||||
* Get total RAM/swap
|
## MySQLTuner slow queries checks
|
||||||
* Is there enough memory for max connections reached by MySQL?
|
|
||||||
* Is there enough memory for max connections allowed by MySQL?
|
* Percentage of Slow queries (<5%)
|
||||||
* Max percentage of memory used (<85%)
|
|
||||||
|
## MySQLTuner replication checks
|
||||||
## MySQLTuner slow queries checks
|
|
||||||
|
* Is server replication configured as slave ?
|
||||||
* Percentage of Slow queries (<5%)
|
* SQL replication thread running ?
|
||||||
|
* IO replication thread running ?
|
||||||
## MySQLTuner replication checks
|
* Replication lag in seconds (Seconds_behind_master)
|
||||||
|
* Is Slave configured in read only ?
|
||||||
* Is server replication configured as slave?
|
* replication type ROW, MIX, STMT
|
||||||
* SQL replication thread running?
|
* replication Semisync master
|
||||||
* IO replication thread running?
|
* replication Semisync slave
|
||||||
* Replication lag in seconds (Seconds_behind_master)
|
* XA support activated
|
||||||
* Is Slave configured in read only?
|
* replication started ?
|
||||||
* Replication type ROW, MIX, STMT
|
|
||||||
* Replication Semisync master
|
## MySQLTuner InnoDB information
|
||||||
* Replication Semisync slave
|
|
||||||
* XA support activated
|
* InnoDB Buffer Pool Size
|
||||||
* Replication started?
|
* If possible, innodb_buffer_pool_size should be greater data and index size for Innodb Table
|
||||||
|
* Innodb_buffer_pool_size should around 75 to 80 % of the available system memory.
|
||||||
## MySQLTuner InnoDB information
|
* InnoDB Buffer Pool Instances
|
||||||
|
* MySQL needs 1 instance per 1Go of Buffer Pool
|
||||||
* InnoDB Buffer Pool Size
|
* innodb_buffer_pool instances = round(innodb_buffer_pool_size / 1Go)
|
||||||
* If possible, innodb_buffer_pool_size should be greater than data and index size for Innodb Table
|
* innodb_buffer_pool instances must be equals or lower than 64
|
||||||
* Innodb_buffer_pool_size should be around 75% to 80% of the available system memory.
|
|
||||||
* InnoDB Buffer Pool Instances
|
- A bug in MySQL 5.6 causes SHOW VARIABLES to report an innodb_buffer_pool_instances value of 8 when innodb_buffer_pool_size is less than 1GB and only one buffer pool instance is present (Bug #18343670).
|
||||||
* MySQL needs 1 instance per 1Go of Buffer Pool
|
|
||||||
* innodb_buffer_pool instances = round(innodb_buffer_pool_size / 1Go)
|
* InnoDB Buffer Pool Usage
|
||||||
* innodb_buffer_pool instances must be equal to or lower than 64
|
* If more than 20% of InnoDB buffer pool is not used, MySQLTuner raise an alert.
|
||||||
|
* InnoDB Buffer Pool Log Size
|
||||||
- A bug in MySQL 5.6 causes SHOW VARIABLES to report an innodb_buffer_pool_instances value of 8 when innodb_buffer_pool_size is less than 1GB and only one buffer pool instance is present (Bug #18343670).
|
* InnoDB total log file size should be 25% of innodb_buffer_pool_size
|
||||||
|
* InnoDB Read efficiency
|
||||||
* InnoDB Buffer Pool Usage
|
* Ratio of read without locks
|
||||||
* If more than 20% of InnoDB buffer pool is not used, raise an alert.
|
* InnoDB Write efficiency
|
||||||
* InnoDB Buffer Pool Log Size
|
* Ratio of write without locks
|
||||||
* InnoDB total log file size should be 25% of innodb_buffer_pool_size
|
* InnoDB Log Waits
|
||||||
* InnoDB Read efficiency
|
* Checks that no lock is used on Innodb Log.
|
||||||
* Ratio of read without locks
|
* InnoDB Chunk Size
|
||||||
* InnoDB Write efficiency
|
* Check InnoDB Buffer Pool size is a multiple of InnoDB Buffer Pool chunk size * InnoDB Buffer Pool instances
|
||||||
* Ratio of write without locks
|
|
||||||
* InnoDB Log Waits
|
## MySQLTuner ARIADB information
|
||||||
* Checks that no lock is used on Innodb Log.
|
|
||||||
* InnoDB Chunk Size
|
* Is Aria indexes size is greater than page cache size ?
|
||||||
* Check InnoDB Buffer Pool size is a multiple of InnoDB Buffer Pool chunk size * InnoDB Buffer Pool instances
|
* Page cache read hit ratio (>95%)
|
||||||
|
* Page cache write hit ratio (>95%)
|
||||||
## MySQLTuner AriaDB information
|
|
||||||
|
|
||||||
* Is Aria indexes size greater than page cache size?
|
## MySQLTuner MYISAM information
|
||||||
* Page cache read hit ratio (>95%)
|
|
||||||
* Page cache write hit ratio (>95%)
|
* Key buffer usage (>90%)
|
||||||
|
* Is MyISAM indexes size is greater than key buffer size ?
|
||||||
|
* Key buffer read hit ratio (>95%)
|
||||||
## MySQLTuner MyISAM information
|
* Key buffer write hit ratio (>95%)
|
||||||
|
|
||||||
* Key buffer usage (>90%)
|
## MySQLTuner Galera information
|
||||||
* Is MyISAM indexes size is greater than key buffer size ?
|
* wsrep_ready cluster is ready
|
||||||
* Key buffer read hit ratio (>95%)
|
* wsrep_connected node is connected to other nodes
|
||||||
* Key buffer write hit ratio (>95%)
|
* wsrep_cluster_name is defined.
|
||||||
|
* wsrep_node_name is defined.
|
||||||
## MySQLTuner Galera information
|
* Check thet notification script wsrep_notify_cmd is defined
|
||||||
|
* wsrep_cluster_status PRIMARY /NON PRIMARY.
|
||||||
* wsrep_ready cluster is ready
|
* PRIMARY : Coherent cluster
|
||||||
* wsrep_connected node is connected to other nodes
|
* NO PRIMARY : cluster gets several states
|
||||||
* wsrep_cluster_name is defined.
|
* wsrep_ local_state_comment: Node state
|
||||||
* wsrep_node_name is defined.
|
* SYNCED (uptodate),
|
||||||
* Check thet notification script wsrep_notify_cmd is defined
|
* DONOR(sending information to another node)
|
||||||
* wsrep_cluster_status PRIMARY /NON PRIMARY.
|
* Joiner(Try to reach cluster group)
|
||||||
* PRIMARY : Coherent cluster
|
* SYNCED state able to read/write
|
||||||
* NO PRIMARY : cluster gets several states
|
* wsrep_cluster_conf_id configuration level must be identical in all nodes
|
||||||
* wsrep_ local_state_comment: Node state
|
* wsrep_slave_thread is between 3 or 4 times number of CPU core.
|
||||||
* SYNCED (uptodate),
|
* gcs.limit should be equal to wsrep_slave_threads * 5
|
||||||
* DONOR (sending information to another node)
|
* gcs.fc_factor should be equal to 0.8
|
||||||
* Joiner (try to reach cluster group)
|
* Flow control fraction should be lower than 0.02 (wsrep_flow_control_paused < 0.02)
|
||||||
* SYNCED state able to read/write
|
* wsrep_last_commited committed level must be identical in all nodes
|
||||||
* wsrep_cluster_conf_id configuration level must be identical in all nodes
|
* Look for tables without primary keys
|
||||||
* wsrep_slave_thread is between 3 or 4 times number of CPU core.
|
* Look for non InnoDB tables for Galera
|
||||||
* gcs.limit should be equal to wsrep_slave_threads * 5
|
* Variable innodb_flush_log_at_trx_commit should be set to 0.
|
||||||
* gcs.fc_factor should be equal to 0.8
|
* Check that there is 3 or 5 members in Galera cluster.
|
||||||
* Flow control fraction should be lower than 0.02 (wsrep_flow_control_paused < 0.02)
|
* Check that xtrabackup is used for SST method with wsrep_sst_method variable.
|
||||||
* wsrep_last_commited committed level must be identical in all nodes
|
* Check variables wsrep_OSU_method is defined to TOI for updates.
|
||||||
* Look for tables without primary keys
|
* Check that there is no certification failures controlling wsrep_local_cert_failures status.
|
||||||
* Look for non InnoDB tables for Galera
|
|
||||||
* Variable innodb_flush_log_at_trx_commit should be set to 0.
|
## MySQLTuner TokuDB information
|
||||||
* Check that there are 3 or 5 members in Galera cluster.
|
|
||||||
* Check that xtrabackup is used for SST method with wsrep_sst_method variable.
|
* tokudb_cache_size
|
||||||
* Check variables wsrep_OSU_method is defined to TOI for updates.
|
* tokudb_directio
|
||||||
* Check that there is no certification failures controlling wsrep_local_cert_failures status.
|
* tokudb_empty_scan
|
||||||
|
* tokudb_read_block_size
|
||||||
## MySQLTuner TokuDB information
|
* tokudb_commit_sync
|
||||||
|
* tokudb_checkpointing_period
|
||||||
* tokudb_cache_size
|
* tokudb_block_size
|
||||||
* tokudb_directio
|
* tokudb_cleaner_iterations
|
||||||
* tokudb_empty_scan
|
* tokudb_fanout
|
||||||
* tokudb_read_block_size
|
|
||||||
* tokudb_commit_sync
|
## MySQLTuner XtraDB information
|
||||||
* tokudb_checkpointing_period
|
|
||||||
* tokudb_block_size
|
* Nothing for the moment
|
||||||
* tokudb_cleaner_iterations
|
|
||||||
* tokudb_fanout
|
## MySQLTuner Connect information
|
||||||
|
|
||||||
## MySQLTuner XtraDB information
|
* Nothing for the moment
|
||||||
|
|
||||||
* Not implemented
|
## MySQLTuner Spider information
|
||||||
|
|
||||||
## MySQLTuner Connect information
|
* Nothing for the moment
|
||||||
|
|
||||||
* Not implemented
|
## MySQLTuner RocksDb information
|
||||||
|
|
||||||
## MySQLTuner Spider information
|
* Nothing for the moment
|
||||||
|
|
||||||
* Not implemented
|
## MySQLTuner Thread pool information
|
||||||
|
|
||||||
## MySQLTuner RocksDb information
|
* thread_pool_size between 16 to 36 for Innodb usage
|
||||||
|
* thread_pool_size between 4 to 8 for MyIsam usage
|
||||||
* Not implemented
|
|
||||||
|
## MySQLTuner performance schema and sysschema information
|
||||||
## MySQLTuner Thread pool information
|
* Check that Performance schema is activated for 5.6+ version
|
||||||
|
* Check that Performance schema is deactivated for 5.5- version
|
||||||
* thread_pool_size between 16 to 36 for Innodb usage
|
* Check that Sys schema is installed
|
||||||
* thread_pool_size between 4 to 8 for MyISAM usage
|
* sys Schema version
|
||||||
|
* Top user per connection
|
||||||
## MySQLTuner performance schema and sysschema information
|
* Top user per statement
|
||||||
|
* Top user per statement latency
|
||||||
* Check that Performance schema is activated for 5.6+ version
|
* Top user per lock latency
|
||||||
* Check that Performance schema is deactivated for 5.5- version
|
* Top user per full scans
|
||||||
* Check that Sys schema is installed
|
* Top user per row_sent
|
||||||
* Sys Schema version
|
* Top user per row modified
|
||||||
* Top user per connection
|
* Top user per io
|
||||||
* Top user per statement
|
* Top user per io latency
|
||||||
* Top user per statement latency
|
* Top host per connection
|
||||||
* Top user per lock latency
|
* Top host per statement
|
||||||
* Top user per full scans
|
* Top host per statement latency
|
||||||
* Top user per row_sent
|
* Top host per lock latency
|
||||||
* Top user per row modified
|
* Top host per full scans
|
||||||
* Top user per io
|
* Top host per rows sent
|
||||||
* Top user per io latency
|
* Top host per rows modified
|
||||||
* Top host per connection
|
* Top host per io
|
||||||
* Top host per statement
|
* Top 5 host per io latency
|
||||||
* Top host per statement latency
|
* Top IO type order by total io
|
||||||
* Top host per lock latency
|
* Top IO type order by total latency
|
||||||
* Top host per full scans
|
* Top IO type order by max latency
|
||||||
* Top host per rows sent
|
* Top Stages order by total io
|
||||||
* Top host per rows modified
|
* Top Stages order by total latency
|
||||||
* Top host per io
|
* Top Stages order by avg latency
|
||||||
* Top 5 host per io latency
|
* Top host per table scans
|
||||||
* Top IO type order by total io
|
* InnoDB Buffer Pool by schema
|
||||||
* Top IO type order by total latency
|
* InnoDB Buffer Pool by table
|
||||||
* Top IO type order by max latency
|
* Process per allocated memory
|
||||||
* Top Stages order by total io
|
* InnoDB Lock Waits
|
||||||
* Top Stages order by total latency
|
* Threads IO Latency
|
||||||
* Top Stages order by avg latency
|
* High Cost SQL statements
|
||||||
* Top host per table scans
|
* Top 5% slower queries
|
||||||
* InnoDB Buffer Pool by schema
|
* Top 10 nb statement type
|
||||||
* InnoDB Buffer Pool by table
|
* Top statement by total latency
|
||||||
* Process per allocated memory
|
* Top statement by lock latency
|
||||||
* InnoDB Lock Waits
|
* Top statement by full scans
|
||||||
* Threads IO Latency
|
* Top statement by rows sent
|
||||||
* High Cost SQL statements
|
* Top statement by rows modified
|
||||||
* Top 5% slower queries
|
* Use temporary tables
|
||||||
* Top 10 nb statement type
|
* Unused Indexes
|
||||||
* Top statement by total latency
|
* Full table scans
|
||||||
* Top statement by lock latency
|
* Latest file IO by latency
|
||||||
* Top statement by full scans
|
* File by IO read bytes
|
||||||
* Top statement by rows sent
|
* File by IO written bytes
|
||||||
* Top statement by rows modified
|
* File per IO total latency
|
||||||
* Use temporary tables
|
* File per IO read latency
|
||||||
* Unused Indexes
|
* File per IO write latency
|
||||||
* Full table scans
|
* Event Wait by read bytes
|
||||||
* Latest file IO by latency
|
* Event Wait by write bytes
|
||||||
* File by IO read bytes
|
* Event per wait total latency
|
||||||
* File by IO written bytes
|
* Event per wait read latency
|
||||||
* File per IO total latency
|
* Event per wait write latency
|
||||||
* File per IO read latency
|
* TOP 15 most read indexes
|
||||||
* File per IO write latency
|
* TOP 15 most modified indexes
|
||||||
* Event Wait by read bytes
|
* TOP 15 high select latency index
|
||||||
* Event Wait by write bytes
|
* TOP 15 high insert latency index
|
||||||
* Event per wait total latency
|
* TOP 15 high update latency index
|
||||||
* Event per wait read latency
|
* TOP 15 high delete latency index
|
||||||
* Event per wait write latency
|
* TOP 15 most read tables
|
||||||
* Top 15 most read indexes
|
* TOP 15 most modified tables
|
||||||
* Top 15 most modified indexes
|
* TOP 15 high select latency tables
|
||||||
* Top 15 high select latency index
|
* TOP 15 high insert latency tables
|
||||||
* Top 15 high insert latency index
|
* TOP 15 high update latency tables
|
||||||
* Top 15 high update latency index
|
* TOP 15 high delete latency tables
|
||||||
* Top 15 high delete latency index
|
* Redundant indexes
|
||||||
* Top 15 most read tables
|
* Tables not using InnoDb buffer
|
||||||
* Top 15 most modified tables
|
* Top 15 Tables using InnoDb buffer
|
||||||
* Top 15 high select latency tables
|
* Top 15 Tables with InnoDb buffer free
|
||||||
* Top 15 high insert latency tables
|
* Top 15 Most executed queries
|
||||||
* Top 15 high update latency tables
|
* Latest SQL queries in errors or warnings
|
||||||
* Top 15 high delete latency tables
|
* Top 20 queries with full table scans
|
||||||
* Redundant indexes
|
* TOP 15 reader queries (95% percentile)
|
||||||
* Tables not using InnoDb buffer
|
* TOP 15 row look queries (95% percentile)
|
||||||
* Top 15 Tables using InnoDb buffer
|
* TOP 15 total latency queries (95% percentile)
|
||||||
* Top 15 Tables with InnoDb buffer free
|
* TOP 15 max latency queries (95% percentile)
|
||||||
* Top 15 Most executed queries
|
* TOP 15 average latency queries (95% percentile)
|
||||||
* Latest SQL queries in errors or warnings
|
* Top 20 queries with sort
|
||||||
* Top 20 queries with full table scans
|
* Last 50 queries with sort
|
||||||
* Top 15 reader queries (95% percentile)
|
* TOP 15 row sorting queries with sort
|
||||||
* Top 15 row look queries (95% percentile)
|
* TOP 15 total latency queries with sort
|
||||||
* Top 15 total latency queries (95% percentile)
|
* TOP 15 merge queries with sort
|
||||||
* Top 15 max latency queries (95% percentile)
|
* TOP 15 average sort merges queries with sort
|
||||||
* Top 15 average latency queries (95% percentile)
|
* TOP 15 scans queries with sort
|
||||||
* Top 20 queries with sort
|
* TOP 15 range queries with sort
|
||||||
* Last 50 queries with sort
|
* Top 20 queries with temp table
|
||||||
* Top 15 row sorting queries with sort
|
* Last 50 queries with temp table
|
||||||
* Top 15 total latency queries with sort
|
* TOP 15 total latency queries with temp table
|
||||||
* Top 15 merge queries with sort
|
* TOP 15 queries with temp table to disk
|
||||||
* Top 15 average sort merges queries with sort
|
* TOP 15 class events by number
|
||||||
* Top 15 scans queries with sort
|
* TOP 30 events by number
|
||||||
* Top 15 range queries with sort
|
* TOP 15 class events by total latency
|
||||||
* Top 20 queries with temp table
|
* TOP 30 events by total latency
|
||||||
* Last 50 queries with temp table
|
* TOP 15 class events by max latency
|
||||||
* Top 15 total latency queries with temp table
|
* TOP 30 events by max latency
|
||||||
* Top 15 queries with temp table to disk
|
|
||||||
* Top 15 class events by number
|
|
||||||
* Top 30 events by number
|
|
||||||
* Top 15 class events by total latency
|
|
||||||
* Top 30 events by total latency
|
|
||||||
* Top 15 class events by max latency
|
|
||||||
* Top 30 events by max latency
|
|
||||||
|
|
90
Makefile
90
Makefile
|
@ -1,90 +0,0 @@
|
||||||
VERSION=$(shell grep '\- Version ' mysqltuner.pl | awk '{ print $$NF}')
|
|
||||||
UPDATE_SUB_VERSION=$(shell echo $(VERSION) | awk -F. '{ print $$1"."$$2"."$$3+1 }')
|
|
||||||
UPDATE_MINOR_VERSION=$(shell echo $(VERSION) | awk -F. '{ print $$1"."$$2+1".0" }')
|
|
||||||
UPDATE_MAJOR_VERSION=$(shell echo $(VERSION) | awk -F. '{ print $$1+1".0.0" }')
|
|
||||||
|
|
||||||
all: generate_cve generate_features generate_usage tidy increment_sub_version
|
|
||||||
|
|
||||||
help:
|
|
||||||
@echo "Usage: make <target>"
|
|
||||||
@echo " help: Show this help"
|
|
||||||
@echo " generate_usage: Generate USAGE.md"
|
|
||||||
@echo " generate_cve: Generate vulnerabilities.csv"
|
|
||||||
@echo " generate_features: Generate FEATURES.md"
|
|
||||||
@echo " tidy: Tidy mysqltuner.pl"
|
|
||||||
@echo " installdep_debian: Install dependencies on Debian"
|
|
||||||
@echo " increment_sub_version: Increment sub version"
|
|
||||||
@echo " increment_minor_version: Increment minor version"
|
|
||||||
@echo " increment_major_version: Increment major version"
|
|
||||||
@echo " push: Push to GitHub"
|
|
||||||
|
|
||||||
|
|
||||||
installdep_debian:
|
|
||||||
sudo apt install -y cpanminus libpod-markdown-perl libwww-mechanize-gzip-perl perltidy dos2unix
|
|
||||||
sudo cpanm File::Util
|
|
||||||
curl -sL https://raw.githubusercontent.com/slimtoolkit/slim/master/scripts/install-slim.sh | sudo -E bash -
|
|
||||||
|
|
||||||
tidy:
|
|
||||||
dos2unix ./mysqltuner.pl
|
|
||||||
perltidy -b ./mysqltuner.pl
|
|
||||||
git add ./mysqltuner.pl
|
|
||||||
git commit -m "Indenting mysqltuner at $(shell date --iso=seconds)"
|
|
||||||
|
|
||||||
generate_usage:
|
|
||||||
pod2markdown mysqltuner.pl >USAGE.md
|
|
||||||
git add ./USAGE.md
|
|
||||||
git commit -m "Generate USAGE.md at $(shell date --iso=seconds)"
|
|
||||||
|
|
||||||
generate_cve:
|
|
||||||
perl ./build/updateCVElist.pl
|
|
||||||
git add ./vulnerabilities.csv
|
|
||||||
git commit -m "Generate CVE list at $(shell date --iso=seconds)"
|
|
||||||
|
|
||||||
generate_version_file:
|
|
||||||
rm -f CURRENT_VERSION.txt
|
|
||||||
grep "# mysqltuner.pl - Version" ./mysqltuner.pl | awk '{ print $$NF}' > CURRENT_VERSION.txt
|
|
||||||
|
|
||||||
generate_features:
|
|
||||||
perl ./build/genFeatures.sh
|
|
||||||
git add ./FEATURES.md
|
|
||||||
git commit -m "Generate FEATURES.md at $(shell date --iso=seconds)"
|
|
||||||
|
|
||||||
increment_sub_version:
|
|
||||||
@echo "Incrementing sub version from $(VERSION) to $(UPDATE_SUB_VERSION)"
|
|
||||||
sed -i "s/$(VERSION)/$(UPDATE_SUB_VERSION)/" mysqltuner.pl *.md .github/workflows/*.yml
|
|
||||||
git add ./*.md ./mysqltuner.pl
|
|
||||||
git commit -m "Generate $(UPDATE_SUB_VERSION) sub version at $(shell date --iso=seconds)"
|
|
||||||
git tag -a v$(UPDATE_SUB_VERSION) -m "Generate $(UPDATE_SUB_VERSION) sub version at $(shell date --iso=seconds)"
|
|
||||||
git push --tags
|
|
||||||
|
|
||||||
increment_minor_version:
|
|
||||||
@echo "Incrementing minor version from $(VERSION) to $(UPDATE_MINOR_VERSION)"
|
|
||||||
sed -i "s/$(VERSION)/$(UPDATE_MINOR_VERSION)/" mysqltuner.pl *.md .github/workflows/*.yml
|
|
||||||
git add ./*.md ./mysqltuner.pl
|
|
||||||
git commit -m "Generate $(UPDATE_MINOR_VERSION) minor version at $(shell date --iso=seconds)"
|
|
||||||
git tag -a v$(UPDATE_MINOR_VERSION) -m "Generate $(UPDATE_MINOR_VERSION) minor version at $(shell date --iso=seconds)"
|
|
||||||
git push --tags
|
|
||||||
|
|
||||||
increment_major_version:
|
|
||||||
@echo "Incrementing major version from $(VERSION) to $(UPDATE_MAJOR_VERSION)"
|
|
||||||
sed -i "s/$(VERSION)/$(UPDATE_MAJOR_VERSION)/" mysqltuner.pl *.md .github/workflows/*.yml
|
|
||||||
git add ./*.md ./mysqltuner.pl
|
|
||||||
git commit -m "Generate $(UPDATE_SUB_VERSION) major version at $(shell date --iso=seconds)"
|
|
||||||
git tag -a v$(UPDATE_MINOR_VERSION) -m "Generate $(UPDATE_MAJOR_VERSION) major version at $(shell date --iso=seconds)"
|
|
||||||
git push --tags
|
|
||||||
|
|
||||||
docker_build:
|
|
||||||
docker build . -t jmrenouard/mysqltuner:latest -t jmrenouard/mysqltuner:$(VERSION)
|
|
||||||
|
|
||||||
docker_slim:
|
|
||||||
docker run --rm -it --privileged -v /var/run/docker.sock:/var/run/docker.sock -v $(PWD):/root/app -w /root/app jmrenouard/mysqltuner:latest slim build
|
|
||||||
|
|
||||||
docker_push: docker_build
|
|
||||||
bash build/publishtodockerhub.sh $(VERSION)
|
|
||||||
|
|
||||||
|
|
||||||
push:
|
|
||||||
git push
|
|
||||||
|
|
||||||
pull:
|
|
||||||
git pull
|
|
472
README.fr.md
472
README.fr.md
|
@ -1,236 +1,236 @@
|
||||||

|
MySQLTuner-perl
|
||||||
|
====
|
||||||
[](https://www.buymeacoffee.com/jmrenouard)
|
[](https://travis-ci.org/major/MySQLTuner-perl)
|
||||||
|
[](http://opensource.box.com/badges)
|
||||||
[](http://opensource.box.com/badges)
|
[](http://opensource.box.com/badges)
|
||||||
[](http://opensource.box.com/badges)
|
[](http://isitmaintained.com/project/major/MySQLTuner-perl "Average time to resolve an issue")
|
||||||
[](http://isitmaintained.com/project/major/MySQLTuner-perl "Average time to resolve an issue")
|
[](http://isitmaintained.com/project/major/MySQLTuner-perl "Percentage of issues still open")
|
||||||
[](http://isitmaintained.com/project/major/MySQLTuner-perl "Percentage of issues still open")
|
[](https://opensource.org/licenses/GPL-3.0/)
|
||||||
[](https://opensource.org/licenses/GPL-3.0/)
|
|
||||||
|
**MySQLTuner** est un script écrit en Perl qui permet d'effectuer une revue de configuration pour MySQL/MAriaDB/PerconaDB rapidement et propose des ajustements pour améliorer la performance et la stabilité du serveur. L'état des variables et statuts est analysé et présenté de manière synthétique et structurée ainsi que plusieurs suggestions basiques concernant la performance.
|
||||||
**MySQLTuner** est un script écrit en Perl qui permet d'effectuer une revue de configuration pour MySQL/MAriaDB/PerconaDB rapidement et propose des ajustements pour améliorer la performance et la stabilité du serveur. L'état des variables et statuts est analysé et présenté de manière synthétique et structurée ainsi que plusieurs suggestions basiques concernant la performance.
|
|
||||||
|
**MySQLTuner** supporte dans a dernière version plus de ~300 indicators pour MySQL/MariaDB/Percona Server.
|
||||||
**MySQLTuner** supporte dans a dernière version plus de ~300 indicators pour MySQL/MariaDB/Percona Server.
|
|
||||||
|
**MySQLTuner** is maintained and indicator collect is increasing week after week supporting a lot of configuration sush as , , , Linux OS metrics, , , , ...
|
||||||
**MySQLTuner** is maintained and indicator collect is increasing week after week supporting a lot of configuration sush as , , , Linux OS metrics, , , , ...
|
|
||||||
|
You can found more details on this indicators
|
||||||
You can found more details on this indicators
|
.
|
||||||
.
|
|
||||||
|
|
||||||
|

|
||||||

|
|
||||||
|
MySQLTuner needs you:
|
||||||
MySQLTuner needs you:
|
===
|
||||||
===
|
|
||||||
|
**MySQLTuner** needs contributors for documentation, code and feedbacks..
|
||||||
**MySQLTuner** needs contributors for documentation, code and feedbacks..
|
|
||||||
|
* Please join us on issue track at [GitHub tracker](https://github.com/major/MySQLTuner-perl/issues)</a>.
|
||||||
* Please join us on issue track at [GitHub tracker](https://github.com/major/MySQLTuner-perl/issues)</a>.
|
* Contribution guide is avalaible following [MySQLTuner contributing guide](https://github.com/major/MySQLTuner-perl/blob/master/CONTRIBUTING.md)
|
||||||
* Contribution guide is avalaible following [MySQLTuner contributing guide](https://github.com/major/MySQLTuner-perl/blob/master/CONTRIBUTING.md)
|
* Star **MySQLTuner project** at [MySQLTuner Git Hub Project](https://github.com/major/MySQLTuner-perl)
|
||||||
* Star **MySQLTuner project** at [MySQLTuner Git Hub Project](https://github.com/major/MySQLTuner-perl)
|
|
||||||
|
Compatibility:
|
||||||
Compatibility:
|
====
|
||||||
====
|
|
||||||
|
* MySQL 5.7 (full support)
|
||||||
* MySQL 5.7 (full support)
|
* MySQL 5.6 (full support)
|
||||||
* MySQL 5.6 (full support)
|
* MySQL 5.5 (full support)
|
||||||
* MySQL 5.5 (full support)
|
* MariaDB 10.1 (full support)
|
||||||
* MariaDB 10.1 (full support)
|
* MariaDB 10.0 (full support)
|
||||||
* MariaDB 10.0 (full support)
|
* Percona Server 5.6 (full support)
|
||||||
* Percona Server 5.6 (full support)
|
* Percona XtraDB cluster (full support)
|
||||||
* Percona XtraDB cluster (full support)
|
* MySQL 3.23, 4.0, 4.1, 5.0, 5.1 (partial support - deprecated version)
|
||||||
* MySQL 3.23, 4.0, 4.1, 5.0, 5.1 (partial support - deprecated version)
|
* Perl 5.6 or later (with [perl-doc](http://search.cpan.org/~dapm/perl-5.14.4/pod/perldoc.pod) package)
|
||||||
* Perl 5.6 or later (with [perl-doc](http://search.cpan.org/~dapm/perl-5.14.4/pod/perldoc.pod) package)
|
* Unix/Linux based operating system (tested on Linux, BSD variants, and Solaris variants)
|
||||||
* Unix/Linux based operating system (tested on Linux, BSD variants, and Solaris variants)
|
* Windows is not supported at this time (Help wanted !!!!!)
|
||||||
* Windows is not supported at this time (Help wanted !!!!!)
|
* Unrestricted read access to the MySQL server (OS root access recommended for MySQL < 5.1)
|
||||||
* Unrestricted read access to the MySQL server (OS root access recommended for MySQL < 5.1)
|
* CVE vulnerabilites detection support from [https://cve.mitre.org](https://cve.mitre.org)
|
||||||
* CVE vulnerabilites detection support from [https://cve.mitre.org](https://cve.mitre.org)
|
|
||||||
|
***WARNING***
|
||||||
***WARNING***
|
--
|
||||||
--
|
It is **extremely important** for you to fully understand each change
|
||||||
It is **extremely important** for you to fully understand each change
|
you make to a MySQL database server. If you don't understand portions
|
||||||
you make to a MySQL database server. If you don't understand portions
|
of the script's output, or if you don't understand the recommendations,
|
||||||
of the script's output, or if you don't understand the recommendations,
|
**you should consult** a knowledgeable DBA or system administrator
|
||||||
**you should consult** a knowledgeable DBA or system administrator
|
that you trust. **Always** test your changes on staging environments, and
|
||||||
that you trust. **Always** test your changes on staging environments, and
|
always keep in mind that improvements in one area can **negatively affect**
|
||||||
always keep in mind that improvements in one area can **negatively affect**
|
MySQL in other areas.
|
||||||
MySQL in other areas.
|
|
||||||
|
**Seriously - please review the FAQ section below.**
|
||||||
**Seriously - please review the FAQ section below.**
|
|
||||||
|
What MySQLTuner is checking exactly ?
|
||||||
What MySQLTuner is checking exactly ?
|
--
|
||||||
--
|
All checks done by **MySQLTuner** are documented in [MySQLTuner Internals](https://github.com/major/MySQLTuner-perl/blob/master/INTERNALS.md) documentation.
|
||||||
All checks done by **MySQLTuner** are documented in [MySQLTuner Internals](https://github.com/major/MySQLTuner-perl/blob/master/INTERNALS.md) documentation.
|
|
||||||
|
Download/Installation
|
||||||
Download/Installation
|
--
|
||||||
--
|
|
||||||
|
You can download the entire repository by using 'git clone' followed by the cloning URL above. The simplest and shortest method is:
|
||||||
You can download the entire repository by using 'git clone' followed by the cloning URL above. The simplest and shortest method is:
|
|
||||||
|
wget http://mysqltuner.pl/ -O mysqltuner.pl
|
||||||
wget http://mysqltuner.pl/ -O mysqltuner.pl
|
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/basic_passwords.txt -O basic_passwords.txt
|
||||||
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/basic_passwords.txt -O basic_passwords.txt
|
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/vulnerabilities.csv -O vulnerabilities.csv
|
||||||
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/vulnerabilities.csv -O vulnerabilities.csv
|
perl mysqltuner.pl
|
||||||
perl mysqltuner.pl
|
|
||||||
|
Of course, you can add the execute bit (`chmod +x mysqltuner.pl`) so you can execute it without calling perl directly.
|
||||||
Of course, you can add the execute bit (`chmod +x mysqltuner.pl`) so you can execute it without calling perl directly.
|
|
||||||
|
Specific usage
|
||||||
Specific usage
|
--
|
||||||
--
|
|
||||||
|
__Usage:__ Minimal usage locally
|
||||||
__Usage:__ Minimal usage locally
|
|
||||||
|
perl mysqltuner.pl
|
||||||
perl mysqltuner.pl
|
|
||||||
|
__Usage:__ Minimal usage remotely
|
||||||
__Usage:__ Minimal usage remotely
|
|
||||||
|
perl mysqltuner.pl --host targetDNS_IP --user admin_user --pass admin_password
|
||||||
perl mysqltuner.pl --host targetDNS_IP --user admin_user --pass admin_password
|
|
||||||
|
__Usage:__ Enable maximum output information around MySQL/MariaDb without debugging
|
||||||
__Usage:__ Enable maximum output information around MySQL/MariaDb without debugging
|
|
||||||
|
perl mysqltuner.pl --verbose
|
||||||
perl mysqltuner.pl --verbose
|
perl mysqltuner.pl --buffers --dbstat --idxstat --sysstat --pfstat
|
||||||
perl mysqltuner.pl --buffers --dbstat --idxstat --sysstat --pfstat
|
|
||||||
|
|
||||||
|
__Usage:__ Enable CVE vulnerabilities check for your MariaDB or MySQL version
|
||||||
__Usage:__ Enable CVE vulnerabilities check for your MariaDB or MySQL version
|
|
||||||
|
perl mysqltuner.pl --cvefile=vulnerabilities.csv
|
||||||
perl mysqltuner.pl --cvefile=vulnerabilities.csv
|
|
||||||
|
__Usage:__ Write your result in a file with information displayed
|
||||||
__Usage:__ Write your result in a file with information displayed
|
|
||||||
|
perl mysqltuner.pl --outputfile /tmp/result_mysqltuner.txt
|
||||||
perl mysqltuner.pl --outputfile /tmp/result_mysqltuner.txt
|
|
||||||
|
__Usage:__ Write your result in a file **without outputting information**
|
||||||
__Usage:__ Write your result in a file **without outputting information**
|
|
||||||
|
perl mysqltuner.pl --silent --outputfile /tmp/result_mysqltuner.txt
|
||||||
perl mysqltuner.pl --silent --outputfile /tmp/result_mysqltuner.txt
|
|
||||||
|
__Usage:__ Using template model to customize your reporting file based on [Text::Template](https://metacpan.org/pod/Text::Template) syntax.
|
||||||
__Usage:__ Using template model to customize your reporting file based on [Text::Template](https://metacpan.org/pod/Text::Template) syntax.
|
|
||||||
|
perl mysqltuner.pl --silent --reportfile /tmp/result_mysqltuner.txt --template=/tmp/mymodel.tmpl
|
||||||
perl mysqltuner.pl --silent --reportfile /tmp/result_mysqltuner.txt --template=/tmp/mymodel.tmpl
|
|
||||||
|
__Usage:__ Enable debugging information
|
||||||
__Usage:__ Enable debugging information
|
|
||||||
|
perl mysqltuner.pl --debug
|
||||||
perl mysqltuner.pl --debug
|
|
||||||
|
FAQ
|
||||||
FAQ
|
--
|
||||||
--
|
|
||||||
|
**Question: Will MySQLTuner fix my slow MySQL server?**
|
||||||
**Question: Will MySQLTuner fix my slow MySQL server?**
|
|
||||||
|
**No.** MySQLTuner is a read only script. It won't write to any configuration files, change the status of any daemons, or call your mother to wish her a happy birthday. It will give you an overview of your server's performance and make some basic recommendations about improvements that you can make after it completes. *Make sure you read the warning above prior to following any recommendations.*
|
||||||
**No.** MySQLTuner is a read only script. It won't write to any configuration files, change the status of any daemons, or call your mother to wish her a happy birthday. It will give you an overview of your server's performance and make some basic recommendations about improvements that you can make after it completes. *Make sure you read the warning above prior to following any recommendations.*
|
|
||||||
|
**Question: Can I fire my DBA now?**
|
||||||
**Question: Can I fire my DBA now?**
|
|
||||||
|
**MySQLTuner will not replace your DBA in any form or fashion.** If your DBA constantly takes your parking spot and steals your lunch from the fridge, then you may want to consider it - but that's your call.
|
||||||
**MySQLTuner will not replace your DBA in any form or fashion.** If your DBA constantly takes your parking spot and steals your lunch from the fridge, then you may want to consider it - but that's your call.
|
|
||||||
|
**Question: Why does MySQLTuner keep asking me the login credentials for MySQL over and over?**
|
||||||
**Question: Why does MySQLTuner keep asking me the login credentials for MySQL over and over?**
|
|
||||||
|
The script will try its best to log in via any means possible. It will check for ~/.my.cnf files, Plesk password files, and empty password root logins. If none of those are available, then you'll be prompted for a password. If you'd like the script to run in an automated fashion without user intervention, then create a .my.cnf file in your home directory which contains:
|
||||||
The script will try its best to log in via any means possible. It will check for ~/.my.cnf files, Plesk password files, and empty password root logins. If none of those are available, then you'll be prompted for a password. If you'd like the script to run in an automated fashion without user intervention, then create a .my.cnf file in your home directory which contains:
|
|
||||||
|
[client]
|
||||||
[client]
|
user=someusername
|
||||||
user=someusername
|
pass=thatuserspassword
|
||||||
pass=thatuserspassword
|
|
||||||
|
Once you create it, make sure it's owned by your user and the mode on the file is 0600. This should prevent the prying eyes from getting your database login credentials under normal conditions. If a [T-1000 shows up in a LAPD uniform](https://en.wikipedia.org/wiki/T-1000) and demands your database credentials, you won't have much of an option.
|
||||||
Once you create it, make sure it's owned by your user and the mode on the file is 0600. This should prevent the prying eyes from getting your database login credentials under normal conditions. If a [T-1000 shows up in a LAPD uniform](https://en.wikipedia.org/wiki/T-1000) and demands your database credentials, you won't have much of an option.
|
|
||||||
|
**Question: Is there another way to secure credentials on latest MySQL and MariaDB distributions ?**
|
||||||
**Question: Is there another way to secure credentials on latest MySQL and MariaDB distributions ?**
|
|
||||||
|
You could use mysql_config_editor utilities.
|
||||||
You could use mysql_config_editor utilities.
|
|
||||||
|
$ mysql_config_editor set --login-path=client --user=someusername --password --host=localhost
|
||||||
$ mysql_config_editor set --login-path=client --user=someusername --password --host=localhost
|
Enter passord: ********
|
||||||
Enter passord: ********
|
$
|
||||||
$
|
|
||||||
|
At this time, ~/.mylogin.cnf has been written with appropriated rigth access.
|
||||||
At this time, ~/.mylogin.cnf has been written with appropriated rigth access.
|
|
||||||
|
To get information about stored credentials, use the following command:
|
||||||
To get information about stored credentials, use the following command:
|
|
||||||
|
$mysql_config_editor print
|
||||||
$mysql_config_editor print
|
[client]
|
||||||
[client]
|
user = someusername
|
||||||
user = someusername
|
password = *****
|
||||||
password = *****
|
host = localhost
|
||||||
host = localhost
|
|
||||||
|
**Question: What's minimum privileges needed by a specific mysqltuner user in database ?**
|
||||||
**Question: What's minimum privileges needed by a specific mysqltuner user in database ?**
|
|
||||||
|
mysql>GRANT SELECT, PROCESS,EXECUTE, REPLICATION CLIENT,SHOW DATABASES,SHOW VIEW ON *.* FOR 'mysqltuner'@'localhost' identified by pwd1234;
|
||||||
mysql>GRANT SELECT, PROCESS,EXECUTE, REPLICATION CLIENT,SHOW DATABASES,SHOW VIEW ON *.* FOR 'mysqltuner'@'localhost' identified by pwd1234;
|
|
||||||
|
**Question: It's not working on my OS! What gives?!**
|
||||||
**Question: It's not working on my OS! What gives?!**
|
|
||||||
|
These kinds of things are bound to happen. Here are the details I need from you in order to research the problem thoroughly:
|
||||||
These kinds of things are bound to happen. Here are the details I need from you in order to research the problem thoroughly:
|
|
||||||
|
* OS and OS version
|
||||||
* OS and OS version
|
* Architecture (x86, x86_64, IA64, Commodore 64)
|
||||||
* Architecture (x86, x86_64, IA64, Commodore 64)
|
* Exact MySQL version
|
||||||
* Exact MySQL version
|
* Where you obtained your MySQL version (OS package, source, etc)
|
||||||
* Where you obtained your MySQL version (OS package, source, etc)
|
* The full text of the error
|
||||||
* The full text of the error
|
* A copy of SHOW VARIABLES and SHOW GLOBAL STATUS output (if possible)
|
||||||
* A copy of SHOW VARIABLES and SHOW GLOBAL STATUS output (if possible)
|
|
||||||
|
**Question: How to perform a CVE vulneralibity checks ?**
|
||||||
**Question: How to perform a CVE vulneralibity checks ?**
|
|
||||||
|
* Download vulnerabilities.csv from this repository.
|
||||||
* Download vulnerabilities.csv from this repository.
|
* use option --cvefile to perform CVE checks
|
||||||
* use option --cvefile to perform CVE checks
|
|
||||||
|
**Question: How to use mysqltuner from remote host ?**
|
||||||
**Question: How to use mysqltuner from remote host ?**
|
Thanks to [@rolandomysqldba](http://dba.stackexchange.com/users/877/rolandomysqldba)
|
||||||
Thanks to [@rolandomysqldba](http://dba.stackexchange.com/users/877/rolandomysqldba)
|
|
||||||
|
* You will still have to connect like a mysql client:
|
||||||
* You will still have to connect like a mysql client:
|
|
||||||
|
Connection and Authentication
|
||||||
Connection and Authentication
|
|
||||||
|
--host <hostname> Connect to a remote host to perform tests (default: localhost)
|
||||||
--host <hostname> Connect to a remote host to perform tests (default: localhost)
|
--socket <socket> Use a different socket for a local connection
|
||||||
--socket <socket> Use a different socket for a local connection
|
--port <port> Port to use for connection (default: 3306)
|
||||||
--port <port> Port to use for connection (default: 3306)
|
--user <username> Username to use for authentication
|
||||||
--user <username> Username to use for authentication
|
--pass <password> Password to use for authentication
|
||||||
--pass <password> Password to use for authentication
|
--defaults-file <path> defaulfs file for credentials
|
||||||
--defaults-file <path> defaulfs file for credentials
|
|
||||||
|
Since you are using a remote host, use parameters to supply values from the OS
|
||||||
Since you are using a remote host, use parameters to supply values from the OS
|
|
||||||
|
--forcemem <size> Amount of RAM installed in megabytes
|
||||||
--forcemem <size> Amount of RAM installed in megabytes
|
--forceswap <size> Amount of swap memory configured in megabytes
|
||||||
--forceswap <size> Amount of swap memory configured in megabytes
|
|
||||||
|
* You may have to contact your remote SysAdmin to ask how much RAM and swap you have
|
||||||
* You may have to contact your remote SysAdmin to ask how much RAM and swap you have
|
|
||||||
|
If the database has too many tables, or very large table, use this:
|
||||||
If the database has too many tables, or very large table, use this:
|
|
||||||
|
--skipsize Don't enumerate tables and their types/sizes (default: on)
|
||||||
--skipsize Don't enumerate tables and their types/sizes (default: on)
|
(Recommended for servers with many tables)
|
||||||
(Recommended for servers with many tables)
|
|
||||||
|
MySQLTuner and Vagrant
|
||||||
MySQLTuner and Vagrant
|
--
|
||||||
--
|
**MySQLTuner** contains following Vagrant configurations:
|
||||||
**MySQLTuner** contains following Vagrant configurations:
|
* Fedora Core 23 / MariaDB 10.0
|
||||||
* Fedora Core 23 / MariaDB 10.0
|
* Fedora Core 23 / MariaDB 10.1
|
||||||
* Fedora Core 23 / MariaDB 10.1
|
* Fedora Core 23 / MySQL 5.6
|
||||||
* Fedora Core 23 / MySQL 5.6
|
* Fedora Core 23 / MySQL 5.7
|
||||||
* Fedora Core 23 / MySQL 5.7
|
|
||||||
|
**Vagrant File** are stored in Vagrant subdirectory.
|
||||||
**Vagrant File** are stored in Vagrant subdirectory.
|
* Follow this 2 steps after vagrant installation:
|
||||||
* Follow this 2 steps after vagrant installation:
|
* Rename VagrantFile_for_Mxxx into Vagrantfile
|
||||||
* Rename VagrantFile_for_Mxxx into Vagrantfile
|
* vagrant up
|
||||||
* vagrant up
|
|
||||||
|
**MySQLTuner** contains a Vagrant configurations for test purpose and development
|
||||||
**MySQLTuner** contains a Vagrant configurations for test purpose and development
|
* Install VirtualBox and Vagrant
|
||||||
* Install VirtualBox and Vagrant
|
* https://www.virtualbox.org/wiki/Downloads
|
||||||
* https://www.virtualbox.org/wiki/Downloads
|
* https://www.vagrantup.com/downloads.html
|
||||||
* https://www.vagrantup.com/downloads.html
|
* Clone repository
|
||||||
* Clone repository
|
* git clone https://github.com/major/MySQLTuner-perl.git
|
||||||
* git clone https://github.com/major/MySQLTuner-perl.git
|
* Install Vagrant plugins vagrant-hostmanager and vagrant-vbguest
|
||||||
* Install Vagrant plugins vagrant-hostmanager and vagrant-vbguest
|
* vagrant plugin install vagrant-hostmanager
|
||||||
* vagrant plugin install vagrant-hostmanager
|
* vagrant plugin install vagrant-vbguest
|
||||||
* vagrant plugin install vagrant-vbguest
|
* Add Fedora Core 23 box for official Fedora Download Website
|
||||||
* Add Fedora Core 23 box for official Fedora Download Website
|
* vagrant box add --name fc23 https://download.fedoraproject.org/pub/fedora/linux/releases/23/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-23-20151030.x86_64.vagrant-virtualbox.box
|
||||||
* vagrant box add --name fc23 https://download.fedoraproject.org/pub/fedora/linux/releases/23/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-23-20151030.x86_64.vagrant-virtualbox.box
|
* Create a data directory
|
||||||
* Create a data directory
|
* mkdir data
|
||||||
* mkdir data
|
* Rename Vagrantfile_MariaDB10.0 into Vagrantfile
|
||||||
* Rename Vagrantfile_MariaDB10.0 into Vagrantfile
|
* cp MySQLTuner-perl/Vagrant/Vagrantfile_for_MariaDB10.0 Vagrantfile
|
||||||
* cp MySQLTuner-perl/Vagrant/Vagrantfile_for_MariaDB10.0 Vagrantfile
|
* Start vagrant
|
||||||
* Start vagrant
|
* vagrant up
|
||||||
* vagrant up
|
|
||||||
|
MySQLTuner a besoin de vous
|
||||||
MySQLTuner a besoin de vous
|
--
|
||||||
--
|
**MySQLTuner** a besoin de contributeurs pour la documentation, le code, des tests et des retours d'expérience.
|
||||||
**MySQLTuner** a besoin de contributeurs pour la documentation, le code, des tests et des retours d'expérience.
|
|
||||||
|
* Rejoignez-nous sur le suivi de ticket à [GitHub tracker](https://github.com/major/MySQLTuner-perl/issues)</a>.
|
||||||
* Rejoignez-nous sur le suivi de ticket à [GitHub tracker](https://github.com/major/MySQLTuner-perl/issues)</a>.
|
* Le guide de contribution en anglais est disponible ici [MySQLTuner contributing guide](https://github.com/major/MySQLTuner-perl/blob/master/CONTRIBUTING.md)
|
||||||
* Le guide de contribution en anglais est disponible ici [MySQLTuner contributing guide](https://github.com/major/MySQLTuner-perl/blob/master/CONTRIBUTING.md)
|
* Ajouter une étoile à **MySQLTuner project** ici [MySQLTuner Git Hub Project](https://github.com/major/MySQLTuner-perl)
|
||||||
* Ajouter une étoile à **MySQLTuner project** ici [MySQLTuner Git Hub Project](https://github.com/major/MySQLTuner-perl)
|
|
||||||
|
|
18
README.it.md
18
README.it.md
|
@ -1,12 +1,11 @@
|
||||||

|
MySQLTuner-perl
|
||||||
|
====
|
||||||
[](https://www.buymeacoffee.com/jmrenouard)
|
[](https://travis-ci.org/major/MySQLTuner-perl)
|
||||||
|
[](http://opensource.box.com/badges)
|
||||||
[](http://opensource.box.com/badges)
|
[](http://opensource.box.com/badges)
|
||||||
[](http://opensource.box.com/badges)
|
[](http://isitmaintained.com/project/major/MySQLTuner-perl "Average time to resolve an issue")
|
||||||
[](http://isitmaintained.com/project/major/MySQLTuner-perl "Average time to resolve an issue")
|
[](http://isitmaintained.com/project/major/MySQLTuner-perl "Percentage of issues still open")
|
||||||
[](http://isitmaintained.com/project/major/MySQLTuner-perl "Percentage of issues still open")
|
[](https://opensource.org/licenses/GPL-3.0/)
|
||||||
[](https://opensource.org/licenses/GPL-3.0/)
|
|
||||||
|
|
||||||
**MySQLTuner** è uno script Perl che permette di analizzare velocemente una installazione di MySQL, nonché di apportare modifiche per migliorare le prestazioni e la stabilità. In modo coinciso sono riportati lo stato attuale delle variabili di configurazione e i dati sullo stato del sistema, corredati da suggerimenti di base per il miglioramento delle prestazioni.
|
**MySQLTuner** è uno script Perl che permette di analizzare velocemente una installazione di MySQL, nonché di apportare modifiche per migliorare le prestazioni e la stabilità. In modo coinciso sono riportati lo stato attuale delle variabili di configurazione e i dati sullo stato del sistema, corredati da suggerimenti di base per il miglioramento delle prestazioni.
|
||||||
|
|
||||||
|
@ -236,3 +235,4 @@ MySQLTuner ha bisogno di te:
|
||||||
* Problemi e suggerimenti possono essere riportati su [GitHub tracker](https://github.com/major/MySQLTuner-perl/issues).
|
* Problemi e suggerimenti possono essere riportati su [GitHub tracker](https://github.com/major/MySQLTuner-perl/issues).
|
||||||
* La guida per contribuire è disponibile in inglese: [MySQLTuner contributing guide](https://github.com/major/MySQLTuner-perl/blob/master/CONTRIBUTING.md)
|
* La guida per contribuire è disponibile in inglese: [MySQLTuner contributing guide](https://github.com/major/MySQLTuner-perl/blob/master/CONTRIBUTING.md)
|
||||||
* Dai un Stella a **MySQLTuner project** su [GitHub](https://github.com/major/MySQLTuner-perl)
|
* Dai un Stella a **MySQLTuner project** su [GitHub](https://github.com/major/MySQLTuner-perl)
|
||||||
|
|
||||||
|
|
456
README.md
456
README.md
|
@ -1,113 +1,87 @@
|
||||||

|

|
||||||
|
====
|
||||||
[](https://www.buymeacoffee.com/jmrenouard)
|
[](https://travis-ci.org/major/MySQLTuner-perl)
|
||||||
|
|
||||||
[](http://opensource.box.com/badges)
|
[](http://opensource.box.com/badges)
|
||||||
[](https://github.com/anuraghazra/github-readme-stats/)
|
[](http://opensource.box.com/badges)
|
||||||
[](http://isitmaintained.com/project/major/MySQLTuner-perl "Average time to resolve an issue")
|
[](http://isitmaintained.com/project/major/MySQLTuner-perl "Average time to resolve an issue")
|
||||||
[](http://isitmaintained.com/project/major/MySQLTuner-perl "Percentage of issues still open")
|
[](http://isitmaintained.com/project/major/MySQLTuner-perl "Percentage of issues still open")
|
||||||
[](https://opensource.org/licenses/GPL-3.0/)
|
[](https://opensource.org/licenses/GPL-3.0/)
|
||||||
|
|
||||||
**MySQLTuner** is a script written in Perl that allows you to review a MySQL installation quickly and make adjustments to increase performance and stability. The current configuration variables and status data is retrieved and presented in a brief format along with some basic performance suggestions.
|
**MySQLTuner** is a script written in Perl that allows you to review a MySQL installation quickly and make adjustments to increase performance and stability. The current configuration variables and status data is retrieved and presented in a brief format along with some basic performance suggestions.
|
||||||
|
|
||||||
**MySQLTuner** supports ~300 indicators for MySQL/MariaDB/Percona Server in this latest version.
|
**MySQLTuner** supports ~300 indicators for MySQL/MariaDB/Percona Server in this last version.
|
||||||
|
|
||||||
**MySQLTuner** is actively maintained supporting many configurations such as [Galera Cluster](http://galeracluster.com/), [TokuDB](https://www.percona.com/software/mysql-database/percona-tokudb), [Performance schema](https://github.com/mysql/mysql-sys), Linux OS metrics, [InnoDB](http://dev.mysql.com/doc/refman/5.7/en/innodb-storage-engine.html), [MyISAM](http://dev.mysql.com/doc/refman/5.7/en/myisam-storage-engine.html), [Aria](https://mariadb.com/kb/en/mariadb/aria/), ...
|
**MySQLTuner** is maintained and indicator collect is increasing week after week supporting a lot of configuration such as [Galera Cluster](http://galeracluster.com/), [TokuDB](https://www.percona.com/software/mysql-database/percona-tokudb), [Performance schema](https://github.com/mysql/mysql-sys), Linux OS metrics, [InnoDB](http://dev.mysql.com/doc/refman/5.7/en/innodb-storage-engine.html), [MyISAM](http://dev.mysql.com/doc/refman/5.7/en/myisam-storage-engine.html), [Aria](https://mariadb.com/kb/en/mariadb/aria/), ...
|
||||||
|
|
||||||
You can find more details on these indicators here:
|
You can find more details on these indicators here:
|
||||||
[Indicators description](https://github.com/major/MySQLTuner-perl/blob/master/INTERNALS.md).
|
[Indicators description](https://github.com/major/MySQLTuner-perl/blob/master/INTERNALS.md).
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
MySQLTuner needs you
|
MySQLTuner needs you:
|
||||||
===
|
===
|
||||||
|
|
||||||
**MySQLTuner** needs contributors for documentation, code and feedback:
|
**MySQLTuner** needs contributors for documentation, code and feedback..
|
||||||
|
|
||||||
* Please join us on our issue tracker at [GitHub tracker](https://github.com/major/MySQLTuner-perl/issues).
|
* Please join us on issue track at [GitHub tracker](https://github.com/major/MySQLTuner-perl/issues).
|
||||||
* Contribution guide is available following [MySQLTuner contributing guide](https://github.com/major/MySQLTuner-perl/blob/master/CONTRIBUTING.md)
|
* Contribution guide is available following [MySQLTuner contributing guide](https://github.com/major/MySQLTuner-perl/blob/master/CONTRIBUTING.md)
|
||||||
* Star **MySQLTuner project** at [MySQLTuner Git Hub Project](https://github.com/major/MySQLTuner-perl)
|
* Star **MySQLTuner project** at [MySQLTuner Git Hub Project](https://github.com/major/MySQLTuner-perl)
|
||||||
* Paid support for LightPath here: [jmrenouard@lightpath.fr](jmrenouard@lightpath.fr)
|
|
||||||
* Paid support for Releem available here: [Releem App](https://releem.com/)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Stargazers over time
|
## Stargazers over time
|
||||||
|
|
||||||
[](https://starchart.cc/major/MySQLTuner-perl)
|
[](https://starcharts.herokuapp.com/major/MySQLTuner-perl)
|
||||||
|
|
||||||
|
|
||||||
Compatibility
|
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)
|
||||||
|
* MySQL 5.7 (full support)
|
||||||
|
* MySQL 5.6 (full support, no more MySQL support)
|
||||||
|
* MySQL 5.5 (full support, no more MySQL support)
|
||||||
|
* MariaDB 10.5 (full support)
|
||||||
|
* MariaDB 10.4 (full support)
|
||||||
|
* MariaDB 10.3 (full support)
|
||||||
|
* MariaDB 10.2 (full support)
|
||||||
|
* MariaDB 10.1 (full support, no more MariaDB support)
|
||||||
|
* MariaDB 10.0 (full support, no more MariaDB support)
|
||||||
|
* MariaDB 5.5 (full support, no more MariaDB support)
|
||||||
|
* Percona Server 8.0 (partial support, password checks don't work)
|
||||||
|
* Percona Server 5.7 (full support)
|
||||||
|
* Percona Server 5.6 (full support)
|
||||||
|
|
||||||
Test result are available here:
|
* Percona XtraDB cluster (partial support, no test environment)
|
||||||
|
|
||||||
* 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 Replications (partial support, no test environment)
|
||||||
|
* Galera replication (partial support, no test environment)
|
||||||
|
|
||||||
* MySQL 8.1 (not supported, deprecated version)
|
* MySQL 3.23, 4.0, 4.1, 5.0, 5.1 (partial support - 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)
|
|
||||||
|
|
||||||
***Windows Support is partial***
|
*** UNSUPPORTED ENVIRONMENTS - NEED HELP FOR THAT :) ***
|
||||||
|
* Windows is not supported at this time (Help wanted !!!!!)
|
||||||
* Windows is now supported at this time
|
* Cloud based is not supported at this time (Help wanted !!!!!)
|
||||||
* Successfully run MySQLtuner across WSL2 (Windows Subsystem Linux)
|
|
||||||
* [https://docs.microsoft.com/en-us/windows/wsl/](https://docs.microsoft.com/en-us/windows/wsl/)
|
|
||||||
|
|
||||||
***UNSUPPORTED ENVIRONMENTS - NEED HELP WITH THAT***
|
|
||||||
* 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
|
|
||||||
* Archive
|
|
||||||
* Spider
|
|
||||||
* ColummStore
|
|
||||||
* Connect
|
|
||||||
|
|
||||||
Unmaintenained stuff 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)
|
* CVE vulnerabilities detection support from [https://cve.mitre.org](https://cve.mitre.org)
|
||||||
|
|
||||||
***MINIMAL REQUIREMENTS***
|
*** MINIMAL REQUIREMENTS ***
|
||||||
|
|
||||||
* Perl 5.6 or later (with [perl-doc](http://search.cpan.org/~dapm/perl-5.14.4/pod/perldoc.pod) package)
|
* Perl 5.6 or later (with [perl-doc](http://search.cpan.org/~dapm/perl-5.14.4/pod/perldoc.pod) package)
|
||||||
* Unix/Linux based operating system (tested on Linux, BSD variants, and Solaris variants)
|
* Unix/Linux based operating system (tested on Linux, BSD variants, and Solaris variants)
|
||||||
* Unrestricted read access to the MySQL server
|
* Unrestricted read access to the MySQL server (OS root access recommended for MySQL < 5.1)
|
||||||
OS root access recommended for MySQL < 5.1
|
|
||||||
|
|
||||||
***WARNING***
|
***WARNING***
|
||||||
--
|
--
|
||||||
|
It is **extremely important** for you to fully understand each change
|
||||||
It is **important** for you to fully understand each change
|
|
||||||
you make to a MySQL database server. If you don't understand portions
|
you make to a MySQL database server. If you don't understand portions
|
||||||
of the script's output, or if you don't understand the recommendations,
|
of the script's output, or if you don't understand the recommendations,
|
||||||
**you should consult** a knowledgeable DBA or system administrator
|
**you should consult** a knowledgeable DBA or system administrator
|
||||||
that you trust. **Always** test your changes on staging environments, and
|
that you trust. **Always** test your changes on staging environments, and
|
||||||
always keep in mind that improvements in one area can **adversely affect**
|
always keep in mind that improvements in one area can **negatively affect**
|
||||||
MySQL in other areas.
|
MySQL in other areas.
|
||||||
|
|
||||||
It's **also important** to wait at least 24 hours of uptime to get accurate results. In fact, running
|
It's **also important** to wait at least a day of uptime to get accurate results. In fact, running
|
||||||
**mysqltuner** on a fresh restarted server is completely useless.
|
**mysqltuner** on a fresh restarted server is completely useless.
|
||||||
|
|
||||||
**Also review the FAQ section below.**
|
**Seriously - please review the FAQ section below.**
|
||||||
|
|
||||||
|
|
||||||
Security recommendations
|
Security recommendations
|
||||||
--
|
--
|
||||||
|
@ -116,9 +90,8 @@ Hi directadmin user!
|
||||||
We detected that you run mysqltuner with da_admin's credentials taken from `/usr/local/directadmin/conf/my.cnf`, which might bring to a password discovery!
|
We detected that you run mysqltuner with da_admin's credentials taken from `/usr/local/directadmin/conf/my.cnf`, which might bring to a password discovery!
|
||||||
Read link for more details [Issue #289](https://github.com/major/MySQLTuner-perl/issues/289).
|
Read link for more details [Issue #289](https://github.com/major/MySQLTuner-perl/issues/289).
|
||||||
|
|
||||||
What is MySQLTuner checking exactly ?
|
What MySQLTuner is checking exactly ?
|
||||||
--
|
--
|
||||||
|
|
||||||
All checks done by **MySQLTuner** are documented in [MySQLTuner Internals](https://github.com/major/MySQLTuner-perl/blob/master/INTERNALS.md) documentation.
|
All checks done by **MySQLTuner** are documented in [MySQLTuner Internals](https://github.com/major/MySQLTuner-perl/blob/master/INTERNALS.md) documentation.
|
||||||
|
|
||||||
Download/Installation
|
Download/Installation
|
||||||
|
@ -128,7 +101,7 @@ Choose one of these methods:
|
||||||
|
|
||||||
1) Script direct download (the simplest and shortest method):
|
1) Script direct download (the simplest and shortest method):
|
||||||
|
|
||||||
```bash
|
```
|
||||||
wget http://mysqltuner.pl/ -O mysqltuner.pl
|
wget http://mysqltuner.pl/ -O mysqltuner.pl
|
||||||
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/basic_passwords.txt -O basic_passwords.txt
|
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/basic_passwords.txt -O basic_passwords.txt
|
||||||
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/vulnerabilities.csv -O vulnerabilities.csv
|
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/vulnerabilities.csv -O vulnerabilities.csv
|
||||||
|
@ -140,317 +113,99 @@ Optional Sysschema installation for MySQL 5.6
|
||||||
--
|
--
|
||||||
|
|
||||||
Sysschema is installed by default under MySQL 5.7 and MySQL 8 from Oracle.
|
Sysschema is installed by default under MySQL 5.7 and MySQL 8 from Oracle.
|
||||||
By default, on MySQL 5.6/5.7/8, performance schema is enabled.
|
By default, on MySQL 5.6/5.7/8, performance schema is enabled by default.
|
||||||
For previous MySQL 5.6 version, you can follow this command to create a new database sys containing very useful view on Performance schema:
|
For previous 5.6 version, you can follow this command to create a new database sys containing very useful view on Performance schema:
|
||||||
|
|
||||||
Sysschema for MySQL old version
|
curl "https://codeload.github.com/mysql/mysql-sys/zip/master" > sysschema.zip
|
||||||
|
# check zip file
|
||||||
|
unzip -l sysschema.zip
|
||||||
|
unzip sysschema.zip
|
||||||
|
cd mysql-sys-master
|
||||||
|
mysql -uroot -p < sys_56.sql
|
||||||
|
|
||||||
|
Optional Performance schema and Sysschema installation for MariaDB 10.x
|
||||||
--
|
--
|
||||||
|
|
||||||
```bash
|
Sysschema is not installed by default under MariaDB 10.x.
|
||||||
curl "https://codeload.github.com/mysql/mysql-sys/zip/master" > sysschema.zip
|
By default, on MariaDB, performance schema is disabled by default. consider activating performance schema across your my.cnf configuration file:
|
||||||
# check zip file
|
|
||||||
unzip -l sysschema.zip
|
|
||||||
unzip sysschema.zip
|
|
||||||
cd mysql-sys-master
|
|
||||||
mysql -uroot -p < sys_56.sql
|
|
||||||
```
|
|
||||||
|
|
||||||
Sysschema for MariaDB old version
|
[mysqld]
|
||||||
--
|
performance_schema = on
|
||||||
|
|
||||||
```bash
|
You can follow this command to create a new database sys containing very useful view on Performance schema:
|
||||||
curl "https://github.com/FromDual/mariadb-sys/archive/refs/heads/master.zip" > sysschema.zip
|
|
||||||
# check zip file
|
|
||||||
unzip -l sysschema.zip
|
|
||||||
unzip sysschema.zip
|
|
||||||
cd mariadb-sys-master
|
|
||||||
mysql -u root -p < ./sys_10.sql
|
|
||||||
```
|
|
||||||
|
|
||||||
Performance schema setup
|
curl "https://codeload.github.com/FromDual/mariadb-sys/zip/master" > mariadb-sys.zip
|
||||||
--
|
# check zip file
|
||||||
|
unzip -l mariadb-sys.zip
|
||||||
By default, performance_schema is enabled and sysschema is installed on latest version.
|
unzip mariadb-sys.zip
|
||||||
|
cd mariadb-sys-master/
|
||||||
By default, on MariaDB, performance schema is disabled (MariaDB<10.6).
|
mysql -u root -p < ./sys_10.sql
|
||||||
|
|
||||||
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
|
|
||||||
```
|
|
||||||
|
|
||||||
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
|
|
||||||
curl "https://codeload.github.com/FromDual/mariadb-sys/zip/master" > mariadb-sys.zip
|
|
||||||
# check zip file
|
|
||||||
unzip -l mariadb-sys.zip
|
|
||||||
unzip mariadb-sys.zip
|
|
||||||
cd mariadb-sys-master/
|
|
||||||
mysql -u root -p < ./sys_10.sql
|
|
||||||
```
|
|
||||||
|
|
||||||
Errors & solutions for performance schema installation
|
Errors & solutions for performance schema installation
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
Performance tips
|
||||||
--
|
--
|
||||||
|
Metadata statistic updates can impact strongly performance of database servers and MySQLTuner.
|
||||||
|
Be sure that innodb_stats_on_metadata is disabled.
|
||||||
|
|
||||||
|
set global innodb_stats_on_metadata = 0;
|
||||||
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:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ cat /proc/sys/fs/aio-*
|
|
||||||
65536
|
|
||||||
2305
|
|
||||||
```
|
|
||||||
|
|
||||||
For example, to set the aio-max-nr value, add the following line to the /etc/sysctl.conf file:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
fs.aio-max-nr = 1048576
|
|
||||||
```
|
|
||||||
|
|
||||||
To activate the new setting:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ sysctl -p /etc/sysctl.conf
|
|
||||||
```
|
|
||||||
|
|
||||||
Specific usage
|
Specific usage
|
||||||
--
|
--
|
||||||
|
|
||||||
__Usage:__ Minimal usage locally
|
__Usage:__ Minimal usage locally
|
||||||
|
|
||||||
```bash
|
perl mysqltuner.pl --host 127.0.0.1
|
||||||
perl mysqltuner.pl --host 127.0.0.1
|
|
||||||
```
|
|
||||||
|
|
||||||
Of course, you can add the execute bit (`chmod +x mysqltuner.pl`) so you can execute it without calling Perl directly.
|
Of course, you can add the execute bit (`chmod +x mysqltuner.pl`) so you can execute it without calling perl directly.
|
||||||
|
|
||||||
__Usage:__ Minimal usage remotely
|
__Usage:__ Minimal usage remotely
|
||||||
|
|
||||||
In previous version, --forcemem shoud be set manually, in order to be able to run an MySQLTuner analysis
|
perl mysqltuner.pl --host targetDNS_IP --user admin_user --pass admin_password
|
||||||
|
|
||||||
Since 2.1.10, memory and swap are defined to 1Gb by default.
|
|
||||||
|
|
||||||
If you want a more accurate value according to your remote server, feel free to setup --forcemem and --forceswap to real RAM value
|
|
||||||
|
|
||||||
```bash
|
|
||||||
perl mysqltuner.pl --host targetDNS_IP --user admin_user --pass admin_password
|
|
||||||
```
|
|
||||||
|
|
||||||
__Usage:__ Enable maximum output information around MySQL/MariaDb without debugging
|
__Usage:__ Enable maximum output information around MySQL/MariaDb without debugging
|
||||||
|
|
||||||
```bash
|
perl mysqltuner.pl --verbose
|
||||||
perl mysqltuner.pl --verbose
|
perl mysqltuner.pl --buffers --dbstat --idxstat --sysstat --pfstat --tbstat
|
||||||
perl mysqltuner.pl --buffers --dbstat --idxstat --sysstat --pfstat --tbstat
|
|
||||||
```
|
|
||||||
|
|
||||||
__Usage:__ Enable CVE vulnerabilities check for your MariaDB or MySQL version
|
__Usage:__ Enable CVE vulnerabilities check for your MariaDB or MySQL version
|
||||||
|
|
||||||
```bash
|
perl mysqltuner.pl --cvefile=vulnerabilities.csv
|
||||||
perl mysqltuner.pl --cvefile=vulnerabilities.csv
|
|
||||||
```
|
|
||||||
|
|
||||||
__Usage:__ Write your result in a file with information displayed
|
__Usage:__ Write your result in a file with information displayed
|
||||||
|
|
||||||
```bash
|
perl mysqltuner.pl --outputfile /tmp/result_mysqltuner.txt
|
||||||
perl mysqltuner.pl --outputfile /tmp/result_mysqltuner.txt
|
|
||||||
```
|
|
||||||
|
|
||||||
__Usage:__ Write your result in a file **without outputting information**
|
__Usage:__ Write your result in a file **without outputting information**
|
||||||
|
|
||||||
```bash
|
perl mysqltuner.pl --silent --outputfile /tmp/result_mysqltuner.txt
|
||||||
perl mysqltuner.pl --silent --outputfile /tmp/result_mysqltuner.txt
|
|
||||||
```
|
|
||||||
|
|
||||||
__Usage:__ Using template model to customize your reporting file based on [Text::Template](https://metacpan.org/pod/Text::Template) syntax.
|
__Usage:__ Using template model to customize your reporting file based on [Text::Template](https://metacpan.org/pod/Text::Template) syntax.
|
||||||
|
|
||||||
```bash
|
perl mysqltuner.pl --silent --reportfile /tmp/result_mysqltuner.txt --template=/tmp/mymodel.tmpl
|
||||||
perl mysqltuner.pl --silent --reportfile /tmp/result_mysqltuner.txt --template=/tmp/mymodel.tmpl
|
|
||||||
```
|
|
||||||
|
|
||||||
__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
|
__Usage:__ Enable debugging information
|
||||||
|
|
||||||
```bash
|
perl mysqltuner.pl --debug
|
||||||
perl mysqltuner.pl --debug
|
|
||||||
```
|
|
||||||
|
|
||||||
__Usage:__ Update MySQLTuner and data files (password and cve) if needed
|
__Usage:__ Update MySQLTuner and data files (password and cve) if needed
|
||||||
|
|
||||||
```bash
|
perl mysqltuner.pl --checkversion --updateversion
|
||||||
perl mysqltuner.pl --checkversion --updateversion
|
|
||||||
```
|
|
||||||
|
|
||||||
HTML reports based on Python Jinja2
|
|
||||||
--
|
|
||||||
|
|
||||||
HTML generation is based on Python/Jinja2
|
|
||||||
|
|
||||||
**HTML generation Procedure**
|
|
||||||
|
|
||||||
- Generate mysqltuner.pl report using JSON format (--json)
|
|
||||||
- Generate HTML report using j2 python tools
|
|
||||||
|
|
||||||
**Jinja2 Templates are located under templates sub directory**
|
|
||||||
|
|
||||||
A basic example is called basic.html.j2
|
|
||||||
|
|
||||||
**Installation Python j2**
|
|
||||||
|
|
||||||
```bash
|
|
||||||
python -mvenv j2
|
|
||||||
source ./j2/bin/activate
|
|
||||||
(j2) pip install j2
|
|
||||||
```
|
|
||||||
|
|
||||||
**Using Html report generation**
|
|
||||||
|
|
||||||
```bash
|
|
||||||
perl mysqltuner.pl --verbose --json > reports.json
|
|
||||||
cat reports.json j2 -f json MySQLTuner-perl/templates/basic.html.j2 > variables.html
|
|
||||||
```
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
```bash
|
|
||||||
perl mysqltuner.pl --verbose --json | j2 -f json MySQLTuner-perl/templates/basic.html.j2 > variables.html
|
|
||||||
```
|
|
||||||
|
|
||||||
HTML reports based on AHA
|
|
||||||
--
|
|
||||||
|
|
||||||
HTML generation is based on AHA
|
|
||||||
|
|
||||||
**HTML generation Procedure**
|
|
||||||
|
|
||||||
- Generate mysqltuner.pl report using standard text reports
|
|
||||||
- Generate HTML report using aha
|
|
||||||
|
|
||||||
**Installation Aha**
|
|
||||||
|
|
||||||
Follow instructions from Github repo
|
|
||||||
|
|
||||||
[GitHub AHA main repository](https://github.com/theZiz/aha)
|
|
||||||
|
|
||||||
**Using AHA Html report generation**
|
|
||||||
|
|
||||||
perl mysqltuner.pl --verbose --color > reports.txt
|
|
||||||
aha --black --title "MySQLTuner" -f "reports.txt" > "reports.html"
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
perl mysqltuner.pl --verbose --color | aha --black --title "MySQLTuner" > reports.html
|
|
||||||
|
|
||||||
|
|
||||||
FAQ
|
FAQ
|
||||||
--
|
--
|
||||||
**Question: What are the prerequisites for running MySQL tuner ?**
|
|
||||||
|
|
||||||
Before running MySQL tuner, you should have the following:
|
**Question: Will MySQLTuner fix my slow MySQL server?**
|
||||||
|
|
||||||
- A MySQL server installation
|
**No.** MySQLTuner is a read only script. It won't write to any configuration files, change the status of any daemons, or call your mother to wish her a happy birthday. It will give you an overview of your server's performance and make some basic recommendations for improvements that you can make after it completes. *Make sure you read the warning above prior to following any recommendations.*
|
||||||
- Perl installed on your system
|
|
||||||
- Administrative access to your MySQL server
|
|
||||||
|
|
||||||
**Question: Can MySQL tuner make changes to my configuration automatically ?**
|
|
||||||
|
|
||||||
**No.**, MySQL tuner only provides recommendations. It does not make any changes to your configuration files automatically. It is up to the user to review the suggestions and implement them as needed.
|
|
||||||
|
|
||||||
**Question: How often should I run MySQL tuner ?**
|
|
||||||
|
|
||||||
It is recommended to run MySQL tuner periodically, especially after significant changes to your MySQL server or its workload.
|
|
||||||
|
|
||||||
For optimal results, run the script after your server has been running for at least 24 hours to gather sufficient performance data.
|
|
||||||
|
|
||||||
**Question: How do I interpret the results from MySQL tuner ?**
|
|
||||||
|
|
||||||
MySQL tuner provides output in the form of suggestions and warnings.
|
|
||||||
|
|
||||||
Review each recommendation and consider implementing the changes in your MySQL configuration file (usually 'my.cnf' or 'my.ini').
|
|
||||||
|
|
||||||
Be cautious when making changes and always backup your configuration file before making any modifications.
|
|
||||||
|
|
||||||
**Question: Can MySQL tuner cause harm to my database or server ?**
|
|
||||||
|
|
||||||
While MySQL tuner itself will not make any changes to your server, blindly implementing its recommendations without understanding the impact can cause issues.
|
|
||||||
|
|
||||||
Always ensure you understand the implications of each suggestion before applying it to your server.
|
|
||||||
|
|
||||||
**Question: Can I use MySQL tuner for optimizing other database systems like PostgreSQL or SQL Server ?**
|
|
||||||
|
|
||||||
MySQL tuner is specifically designed for MySQL servers.
|
|
||||||
To optimize other database systems, you would need to use tools designed for those systems, such as pgTune for PostgreSQL or SQL Server's built-in performance tools.
|
|
||||||
|
|
||||||
**Question: Does MySQL tuner support MariaDB and Percona Server ?**
|
|
||||||
|
|
||||||
Yes, MySQL tuner supports MariaDB and Percona Server since they are derivatives of MySQL and share a similar architecture. The script can analyze and provide recommendations for these systems as well.
|
|
||||||
|
|
||||||
**Question: What should I do if I need help with MySQL tuner or have questions about the recommendations ?**
|
|
||||||
|
|
||||||
If you need help with MySQL tuner or have questions about the recommendations provided by the script, you can consult the MySQL tuner documentation, seek advice from online forums, or consult a MySQL expert.
|
|
||||||
|
|
||||||
Be cautious when implementing changes to ensure the stability and performance of your server.
|
|
||||||
|
|
||||||
**Question: Will MySQLTuner fix my slow MySQL server ?**
|
|
||||||
|
|
||||||
**No.** MySQLTuner is a read only script. It won't write to any configuration files, change the status of any daemons. It will give you an overview of your server's performance and make some basic recommendations for improvements that you can make after it completes.
|
|
||||||
|
|
||||||
**Question: Can I fire my DBA now?**
|
**Question: Can I fire my DBA now?**
|
||||||
|
|
||||||
**MySQLTuner will not replace your DBA in any form or fashion.**
|
**MySQLTuner will not replace your DBA in any form or fashion.** If your DBA constantly takes your parking spot and steals your lunch from the fridge, then you may want to consider it - but that's your call.
|
||||||
|
|
||||||
If your DBA constantly takes your parking spot and steals your lunch from the fridge, then you may want to consider it - but that's your call.
|
|
||||||
|
|
||||||
**Question: Why does MySQLTuner keep asking me the login credentials for MySQL over and over?**
|
**Question: Why does MySQLTuner keep asking me the login credentials for MySQL over and over?**
|
||||||
|
|
||||||
|
@ -460,7 +215,7 @@ The script will try its best to log in via any means possible. It will check fo
|
||||||
user=someusername
|
user=someusername
|
||||||
password=thatuserspassword
|
password=thatuserspassword
|
||||||
|
|
||||||
Once you create it, make sure it's owned by your user and the mode on the file is 0600. This should prevent the prying eyes from getting your database login credentials under normal conditions.
|
Once you create it, make sure it's owned by your user and the mode on the file is 0600. This should prevent the prying eyes from getting your database login credentials under normal conditions. If a [T-1000 shows up in a LAPD uniform](https://en.wikipedia.org/wiki/T-1000) and demands your database credentials, you won't have much of an option.
|
||||||
|
|
||||||
**Question: Is there another way to secure credentials on latest MySQL and MariaDB distributions ?**
|
**Question: Is there another way to secure credentials on latest MySQL and MariaDB distributions ?**
|
||||||
|
|
||||||
|
@ -473,26 +228,19 @@ After which, `~/.mylogin.cnf` will be created with the appropriate access.
|
||||||
|
|
||||||
To get information about stored credentials, use the following command:
|
To get information about stored credentials, use the following command:
|
||||||
|
|
||||||
```bash
|
$mysql_config_editor print
|
||||||
$mysql_config_editor print
|
[client]
|
||||||
[client]
|
user = someusername
|
||||||
user = someusername
|
password = *****
|
||||||
password = *****
|
host = localhost
|
||||||
host = localhost
|
|
||||||
```
|
|
||||||
|
|
||||||
**Question: What's minimum privileges needed by a specific mysqltuner user in database ?**
|
**Question: What's minimum privileges needed by a specific mysqltuner user in database ?**
|
||||||
|
|
||||||
```bash
|
mysql>GRANT SELECT, PROCESS,EXECUTE, REPLICATION CLIENT,SHOW DATABASES,SHOW VIEW ON *.* TO 'mysqltuner'@'localhost' identified by pwd1234;
|
||||||
mysql>GRANT SELECT, PROCESS,EXECUTE, REPLICATION CLIENT,
|
|
||||||
SHOW DATABASES,SHOW VIEW
|
|
||||||
ON *.*
|
|
||||||
TO 'mysqltuner'@'localhost' identified by pwd1234;
|
|
||||||
```
|
|
||||||
|
|
||||||
**Question: It's not working on my OS! What gives?!**
|
**Question: It's not working on my OS! What gives?!**
|
||||||
|
|
||||||
These kinds of things are bound to happen. Here are the details I need from you to investigate the issue:
|
These kinds of things are bound to happen. Here are the details I need from you in order to research the problem thoroughly:
|
||||||
|
|
||||||
* OS and OS version
|
* OS and OS version
|
||||||
* Architecture (x86, x86_64, IA64, Commodore 64)
|
* Architecture (x86, x86_64, IA64, Commodore 64)
|
||||||
|
@ -600,18 +348,10 @@ MySQLTuner and Vagrant
|
||||||
d985820667c2 mysql:8.0 "docker-entrypoint.s…" 7 hours ago Up 7 hours 0.0.0.0:3306->3306/tcp, 33060/tcp mysql 8 0
|
d985820667c2 mysql:8.0 "docker-entrypoint.s…" 7 hours ago Up 7 hours 0.0.0.0:3306->3306/tcp, 33060/tcp mysql 8 0
|
||||||
|
|
||||||
|
|
||||||
Contributions welcome !
|
MySQLTuner needs you
|
||||||
--
|
--
|
||||||
|
**MySQLTuner** needs contributors for documentation, code and feedback..
|
||||||
|
|
||||||
How to contribute using Pull Request ? Follow this guide : [Pull request creation](https://opensource.com/article/19/7/create-pull-request-github)
|
* Please join us on issue track at [GitHub tracker](https://github.com/major/MySQLTuner-perl/issues).
|
||||||
|
* Contribution guide is available following [MySQLTuner contributing guide](https://github.com/major/MySQLTuner-perl/blob/master/CONTRIBUTING.md)
|
||||||
Simple steps to create a pull request:
|
* Star **MySQLTuner project** at [MySQLTuner Git Hub Project](https://github.com/major/MySQLTuner-perl)
|
||||||
--
|
|
||||||
|
|
||||||
- Fork this Github project
|
|
||||||
- Clone it to your local system
|
|
||||||
- Make a new branch
|
|
||||||
- Make your changes
|
|
||||||
- Push it back to your repo
|
|
||||||
- Click the Compare & pull request button
|
|
||||||
- Click Create pull request to open a new pull request
|
|
||||||
|
|
52
README.ru.md
52
README.ru.md
|
@ -1,24 +1,22 @@
|
||||||

|
MySQLTuner-perl
|
||||||
|
====
|
||||||
[](https://www.buymeacoffee.com/jmrenouard)
|
[](https://travis-ci.org/major/MySQLTuner-perl)
|
||||||
|
|
||||||
[](http://opensource.box.com/badges)
|
[](http://opensource.box.com/badges)
|
||||||
[](http://opensource.box.com/badges)
|
[](http://opensource.box.com/badges)
|
||||||
[](http://isitmaintained.com/project/major/MySQLTuner-perl "Average time to resolve an issue")
|
[](http://isitmaintained.com/project/major/MySQLTuner-perl "Average time to resolve an issue")
|
||||||
[](http://isitmaintained.com/project/major/MySQLTuner-perl "Percentage of issues still open")
|
[](http://isitmaintained.com/project/major/MySQLTuner-perl "Percentage of issues still open")
|
||||||
[](https://opensource.org/licenses/GPL-3.0/)
|
[](https://opensource.org/licenses/GPL-3.0/)
|
||||||
|
|
||||||
|
**MySQLTuner** - это скрипт, написанный на Perl, который позволяет быстро произвести осмотр текущего состояния сервера баз данных MySQL
|
||||||
**MySQLTuner** - это скрипт, написанный на Perl, который позволяет быстро произвести осмотр текущего состояния сервера баз данных MySQL
|
и составить рекомендации для увеличения производительности и стабильности работы. Выводятся текущие параметры конфигурации
|
||||||
и составить рекомендации для увеличения производительности и стабильности работы. Выводятся текущие параметры конфигурации
|
|
||||||
и информация о состоянии в формате отчета с основными подсказками по оптимизации.
|
и информация о состоянии в формате отчета с основными подсказками по оптимизации.
|
||||||
|
|
||||||
**MySQLTuner** поддерживает порядка 300 показателей для MySQL/MariaDB/Percona Server последних версий.
|
**MySQLTuner** поддерживает порядка 300 показателей для MySQL/MariaDB/Percona Server последних версий.
|
||||||
|
|
||||||
**MySQLTuner** поддерживает сбор показателей для множества таких конфигураций, как [Galera Cluster](http://galeracluster.com/), [TokuDB](https://www.percona.com/software/mysql-database/percona-tokudb), [Performance schema](https://github.com/mysql/mysql-sys), метрики ОС Linux, [InnoDB](http://dev.mysql.com/doc/refman/5.7/en/innodb-storage-engine.html), [MyISAM](http://dev.mysql.com/doc/refman/5.7/en/myisam-storage-engine.html), [Aria](https://mariadb.com/kb/en/mariadb/aria/), ...
|
**MySQLTuner** поддерживает сбор показателей для множества таких конфигураций, как [Galera Cluster](http://galeracluster.com/), [TokuDB](https://www.percona.com/software/mysql-database/percona-tokudb), [Performance schema](https://github.com/mysql/mysql-sys), метрики ОС Linux, [InnoDB](http://dev.mysql.com/doc/refman/5.7/en/innodb-storage-engine.html), [MyISAM](http://dev.mysql.com/doc/refman/5.7/en/myisam-storage-engine.html), [Aria](https://mariadb.com/kb/en/mariadb/aria/), ...
|
||||||
|
|
||||||
|
|
||||||
Вы можете найти больше информации об этих показателях на
|
Вы можете найти больше информации об этих показателях на
|
||||||
[Indicators description](https://github.com/major/MySQLTuner-perl/blob/master/INTERNALS.md).
|
[Indicators description](https://github.com/major/MySQLTuner-perl/blob/master/INTERNALS.md).
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,11 +33,11 @@ MySQLTuner нуждается в вас:
|
||||||
|
|
||||||
## Количество "звезд" по времени
|
## Количество "звезд" по времени
|
||||||
|
|
||||||
[](https://starchart.cc/major/MySQLTuner-perl)
|
[](https://starcharts.herokuapp.com/major/MySQLTuner-perl)
|
||||||
|
|
||||||
Совместимость
|
Совместимость
|
||||||
====
|
====
|
||||||
Результаты тестов:
|
Результаты тестов: [Travis CI/MySQLTuner-perl](https://travis-ci.org/major/MySQLTuner-perl)
|
||||||
* MySQL 8 (полная поддержка, проверка пароля не работает)
|
* MySQL 8 (полная поддержка, проверка пароля не работает)
|
||||||
* MySQL 5.7 (полная поддержка)
|
* MySQL 5.7 (полная поддержка)
|
||||||
* MySQL 5.6 (полная поддержка)
|
* MySQL 5.6 (полная поддержка)
|
||||||
|
@ -76,12 +74,12 @@ MySQLTuner нуждается в вас:
|
||||||
|
|
||||||
***ПРЕДУПРЕЖДЕНИЕ***
|
***ПРЕДУПРЕЖДЕНИЕ***
|
||||||
--
|
--
|
||||||
Очень важно, чтобы вы имели представление о том, какие изменения вы
|
Очень важно, чтобы вы имели представление о том, какие изменения вы
|
||||||
вносите в параметры сервера баз данных MySQL. Если вы даже частично
|
вносите в параметры сервера баз данных MySQL. Если вы даже частично
|
||||||
не понимаете вывод отчета скрипта, или не понимаете рекомендации,
|
не понимаете вывод отчета скрипта, или не понимаете рекомендации,
|
||||||
которые делает скрипт, то вам лучше всего обратиться за помощью либо
|
которые делает скрипт, то вам лучше всего обратиться за помощью либо
|
||||||
к документации к серверу баз данных, либо ближайшему системному
|
к документации к серверу баз данных, либо ближайшему системному
|
||||||
администратору. Всегда проверяйте ваши изменения на тестовом сервере
|
администратору. Всегда проверяйте ваши изменения на тестовом сервере
|
||||||
и всегда будьте готовы к тому, что улучшения в одной области могут иметь
|
и всегда будьте готовы к тому, что улучшения в одной области могут иметь
|
||||||
отрицательный эфект в работе MySQL в другой области.
|
отрицательный эфект в работе MySQL в другой области.
|
||||||
|
|
||||||
|
@ -153,6 +151,13 @@ Sysschema не установлена по умолчанию на MariaDB 10.x.
|
||||||
ERROR at line 21: Failed to open file './tables/sys_config_data_10.sql -- ported', error: 2
|
ERROR at line 21: Failed to open file './tables/sys_config_data_10.sql -- ported', error: 2
|
||||||
Посмотрите на #452 решение, данное @ericx
|
Посмотрите на #452 решение, данное @ericx
|
||||||
|
|
||||||
|
Советы по производительности
|
||||||
|
--
|
||||||
|
Обновление статистики метадаты могут очень сильно влиять на производительсноить сервера баз данных и MySQLTuner.
|
||||||
|
Убедитесь, что innodb_stats_on_metadata отключен.
|
||||||
|
|
||||||
|
set global innodb_stats_on_metadata = 0;
|
||||||
|
|
||||||
Примеры использования
|
Примеры использования
|
||||||
--
|
--
|
||||||
|
|
||||||
|
@ -170,7 +175,7 @@ __Пример:__ Включение максимамльного вывода
|
||||||
|
|
||||||
perl mysqltuner.pl --verbose
|
perl mysqltuner.pl --verbose
|
||||||
perl mysqltuner.pl --buffers --dbstat --idxstat --sysstat --pfstat --tbstat
|
perl mysqltuner.pl --buffers --dbstat --idxstat --sysstat --pfstat --tbstat
|
||||||
|
|
||||||
|
|
||||||
__Пример:__ Включение проверки на CVE уязвимости для MariaDB или MySQL
|
__Пример:__ Включение проверки на CVE уязвимости для MariaDB или MySQL
|
||||||
|
|
||||||
|
@ -180,7 +185,7 @@ __Пример:__ Запись результата в файл с отобра
|
||||||
|
|
||||||
perl mysqltuner.pl --outputfile /tmp/result_mysqltuner.txt
|
perl mysqltuner.pl --outputfile /tmp/result_mysqltuner.txt
|
||||||
|
|
||||||
__Пример:__ Запись результата в файл **без вывода информации**
|
__Пример:__ Запись результата в файл **без вывода информации**
|
||||||
|
|
||||||
perl mysqltuner.pl --silent --outputfile /tmp/result_mysqltuner.txt
|
perl mysqltuner.pl --silent --outputfile /tmp/result_mysqltuner.txt
|
||||||
|
|
||||||
|
@ -209,12 +214,12 @@ __Пример:__ Обновление MySQLTuner и файлов с данны
|
||||||
|
|
||||||
**Вопрос: Почему MySQLTuner каждый раз запрашивает доступы в MySQL?**
|
**Вопрос: Почему MySQLTuner каждый раз запрашивает доступы в MySQL?**
|
||||||
|
|
||||||
Скрипт пытается использовать лучшие способы войти из возможных. Он проверяет ~/.my.cnf файлы, файлы паролей Plesk и пробует пустой пароль для пользователя root. Если ни один из этих способов не сработал, то запрашивается ввод пароля. Если вы хотите, чтобы скрипт работал автоматически, создайте в своей домашней директории файл .my.cnf, содержащий:
|
Скрипт пытается использовать лучшие способы войти из возможных. Он проверяет ~/.my.cnf файлы, файлы паролей Plesk и пробует пустой пароль для пользователя root. Если ни один из этих способов не сработал, то запрашивается ввод пароля. Если вы хотите, чтобы скрипт работал автоматически, создайте в своей домашней директории файл .my.cnf, содержащий:
|
||||||
|
|
||||||
[client]
|
[client]
|
||||||
user=distributions
|
user=distributions
|
||||||
password=thatuserspassword
|
password=thatuserspassword
|
||||||
|
|
||||||
Сразу после создания файла убедитесь, что его владельцем является ваш пользователь, а права на файл - 0600. Это защитит ваш логин и пароль от базы данных от любопытных глаз в нормальных условиях. Но у вас не будет выбора, если появится [T-1000 в униформе полицейского из Лос-Анджелеса](https://ru.wikipedia.org/wiki/T-1000) и потребует доступы от вашей базы данных.
|
Сразу после создания файла убедитесь, что его владельцем является ваш пользователь, а права на файл - 0600. Это защитит ваш логин и пароль от базы данных от любопытных глаз в нормальных условиях. Но у вас не будет выбора, если появится [T-1000 в униформе полицейского из Лос-Анджелеса](https://ru.wikipedia.org/wiki/T-1000) и потребует доступы от вашей базы данных.
|
||||||
|
|
||||||
**Вопрос: Есть ли другой способ безопасно сохранить данные для входа в последних версиях MySQL и MariaDB?**
|
**Вопрос: Есть ли другой способ безопасно сохранить данные для входа в последних версиях MySQL и MariaDB?**
|
||||||
|
@ -263,7 +268,7 @@ __Пример:__ Обновление MySQLTuner и файлов с данны
|
||||||
--host <hostname> Connect to a remote host to perform tests (default: localhost)
|
--host <hostname> Connect to a remote host to perform tests (default: localhost)
|
||||||
--socket <socket> Use a different socket for a local connection
|
--socket <socket> Use a different socket for a local connection
|
||||||
--port <port> Port to use for connection (default: 3306)
|
--port <port> Port to use for connection (default: 3306)
|
||||||
--user <username> Username to use for authentication
|
--user <username> Username to use for authentication
|
||||||
--pass <password> Password to use for authentication
|
--pass <password> Password to use for authentication
|
||||||
--defaults-file <path> defaulfs file for credentials
|
--defaults-file <path> defaulfs file for credentials
|
||||||
|
|
||||||
|
@ -287,7 +292,7 @@ MySQLTuner и Vagrant
|
||||||
--
|
--
|
||||||
**MySQLTuner** содержится в следующих конфигурациях Vagrant:
|
**MySQLTuner** содержится в следующих конфигурациях Vagrant:
|
||||||
* Fedora Core 10 / Docker
|
* Fedora Core 10 / Docker
|
||||||
|
|
||||||
**Vagrant File** is stored in Vagrant subdirectory.
|
**Vagrant File** is stored in Vagrant subdirectory.
|
||||||
* Follow following step after vagrant installation:
|
* Follow following step after vagrant installation:
|
||||||
$ vagrant up
|
$ vagrant up
|
||||||
|
@ -354,3 +359,4 @@ MySQLTuner нуждается в Вас:
|
||||||
* Присоединяйтесь, пожалуйста, к нашему трекеру ошибок [GitHub tracker](https://github.com/major/MySQLTuner-perl/issues).
|
* Присоединяйтесь, пожалуйста, к нашему трекеру ошибок [GitHub tracker](https://github.com/major/MySQLTuner-perl/issues).
|
||||||
* Руководство по поддержке проекта доступно на [MySQLTuner contributing guide](https://github.com/major/MySQLTuner-perl/blob/master/CONTRIBUTING.md)
|
* Руководство по поддержке проекта доступно на [MySQLTuner contributing guide](https://github.com/major/MySQLTuner-perl/blob/master/CONTRIBUTING.md)
|
||||||
* Ставьте "звезды" **проекту MySQLTuner** на [MySQLTuner Git Hub Project](https://github.com/major/MySQLTuner-perl)
|
* Ставьте "звезды" **проекту MySQLTuner** на [MySQLTuner Git Hub Project](https://github.com/major/MySQLTuner-perl)
|
||||||
|
|
||||||
|
|
21
SECURITY.md
21
SECURITY.md
|
@ -1,21 +0,0 @@
|
||||||
# Security Policy
|
|
||||||
|
|
||||||
## Supported Versions
|
|
||||||
|
|
||||||
Use this section to tell people about which versions of your project are
|
|
||||||
currently being supported with security updates.
|
|
||||||
|
|
||||||
| Version | Supported |
|
|
||||||
| ------- | ------------------ |
|
|
||||||
| 5.1.x | :white_check_mark: |
|
|
||||||
| 5.0.x | :x: |
|
|
||||||
| 4.0.x | :white_check_mark: |
|
|
||||||
| < 4.0 | :x: |
|
|
||||||
|
|
||||||
## Reporting a Vulnerability
|
|
||||||
|
|
||||||
Use this section to tell people how to report a vulnerability.
|
|
||||||
|
|
||||||
Tell them where to go, how often they can expect to get an update on a
|
|
||||||
reported vulnerability, what to expect if the vulnerability is accepted or
|
|
||||||
declined, etc.
|
|
324
USAGE.md
324
USAGE.md
|
@ -1,171 +1,153 @@
|
||||||
# NAME
|
# NAME
|
||||||
|
|
||||||
MySQLTuner 2.6.0 - MySQL High Performance Tuning Script
|
MySQLTuner 1.7.15 - MySQL High Performance Tuning Script
|
||||||
|
|
||||||
# IMPORTANT USAGE GUIDELINES
|
# IMPORTANT USAGE GUIDELINES
|
||||||
|
|
||||||
To run the script with the default options, run the script without arguments
|
To run the script with the default options, run the script without arguments
|
||||||
Allow MySQL server to run for at least 24-48 hours before trusting suggestions
|
Allow MySQL server to run for at least 24-48 hours before trusting suggestions
|
||||||
Some routines may require root level privileges (script will provide warnings)
|
Some routines may require root level privileges (script will provide warnings)
|
||||||
You must provide the remote server's total memory when connecting to other servers
|
You must provide the remote server's total memory when connecting to other servers
|
||||||
|
|
||||||
# CONNECTION AND AUTHENTICATION
|
# CONNECTION AND AUTHENTICATION
|
||||||
|
|
||||||
--host <hostname> Connect to a remote host to perform tests (default: localhost)
|
--host <hostname> Connect to a remote host to perform tests (default: localhost)
|
||||||
--socket <socket> Use a different socket for a local connection
|
--socket <socket> Use a different socket for a local connection
|
||||||
--port <port> Port to use for connection (default: 3306)
|
--port <port> Port to use for connection (default: 3306)
|
||||||
--protocol tcp Force TCP connection instead of socket
|
--user <username> Username to use for authentication
|
||||||
--user <username> Username to use for authentication
|
--userenv <envvar> Name of env variable which contains username to use for authentication
|
||||||
--userenv <envvar> Name of env variable which contains username to use for authentication
|
--pass <password> Password to use for authentication
|
||||||
--pass <password> Password to use for authentication
|
--passenv <envvar> Name of env variable which contains password to use for authentication
|
||||||
--passenv <envvar> Name of env variable which contains password to use for authentication
|
--ssl-ca <path> Path to public key
|
||||||
--ssl-ca <path> Path to public key
|
--mysqladmin <path> Path to a custom mysqladmin executable
|
||||||
--mysqladmin <path> Path to a custom mysqladmin executable
|
--mysqlcmd <path> Path to a custom mysql executable
|
||||||
--mysqlcmd <path> Path to a custom mysql executable
|
--defaults-file <path> Path to a custom .my.cnf
|
||||||
--defaults-file <path> Path to a custom .my.cnf
|
|
||||||
--defaults-extra-file <path> Path to an extra custom config file
|
# PERFORMANCE AND REPORTING OPTIONS
|
||||||
--server-log <path> Path to explicit log file (error_log)
|
|
||||||
|
--skipsize Don't enumerate tables and their types/sizes (default: on)
|
||||||
# PERFORMANCE AND REPORTING OPTIONS
|
(Recommended for servers with many tables)
|
||||||
|
--skippassword Don't perform checks on user passwords(default: off)
|
||||||
--skipsize Don't enumerate tables and their types/sizes (default: on)
|
--checkversion Check for updates to MySQLTuner (default: don't check)
|
||||||
(Recommended for servers with many tables)
|
--updateversion Check for updates to MySQLTuner and update when newer version is available (default: don't check)
|
||||||
--json Print result as JSON string
|
--forcemem <size> Amount of RAM installed in megabytes
|
||||||
--prettyjson Print result as JSON formatted string
|
--forceswap <size> Amount of swap memory configured in megabytes
|
||||||
--skippassword Don't perform checks on user passwords (default: off)
|
--passwordfile <path> Path to a password file list(one password by line)
|
||||||
--checkversion Check for updates to MySQLTuner (default: don't check)
|
|
||||||
--updateversion Check for updates to MySQLTuner and update when newer version is available (default: don't check)
|
# OUTPUT OPTIONS
|
||||||
--forcemem <size> Amount of RAM installed in megabytes
|
|
||||||
--forceswap <size> Amount of swap memory configured in megabytes
|
--silent Don't output anything on screen
|
||||||
--passwordfile <path> Path to a password file list (one password by line)
|
--nogood Remove OK responses
|
||||||
--cvefile <path> CVE File for vulnerability checks
|
--nobad Remove negative/suggestion responses
|
||||||
--outputfile <path> Path to a output txt file
|
--noinfo Remove informational responses
|
||||||
--reportfile <path> Path to a report txt file
|
--debug Print debug information
|
||||||
--template <path> Path to a template file
|
--noprocess Consider no other process is running
|
||||||
--dumpdir <path> Path to a directory where to dump information files
|
--dbstat Print database information
|
||||||
--feature <feature> Run a specific feature (see FEATURES section)
|
--nodbstat Don't Print database information
|
||||||
--dumpdir <path> information_schema tables and sys views are dumped in CSV in this path
|
--tbstat Print table information
|
||||||
|
--notbstat Don't Print table information
|
||||||
# OUTPUT OPTIONS
|
--idxstat Print index information
|
||||||
|
--noidxstat Don't Print index information
|
||||||
--silent Don't output anything on screen
|
--sysstat Print system information
|
||||||
--verbose Print out all options (default: no verbose, dbstat, idxstat, sysstat, tbstat, pfstat)
|
--nosysstat Don't Print system information
|
||||||
--color Print output in color
|
--pfstat Print Performance schema
|
||||||
--nocolor Don't print output in color
|
--nopfstat Don't Print Performance schema
|
||||||
--nogood Remove OK responses
|
--verbose Prints out all options (default: no verbose, dbstat, idxstat, sysstat, tbstat, pfstat)
|
||||||
--nobad Remove negative/suggestion responses
|
--bannedports Ports banned separated by comma(,)
|
||||||
--noinfo Remove informational responses
|
--maxportallowed Number of ports opened allowed on this hosts
|
||||||
--debug Print debug information
|
--cvefile <path> CVE File for vulnerability checks
|
||||||
--experimental Print experimental analysis (may fail)
|
--nocolor Don't print output in color
|
||||||
--nondedicated Consider server is not dedicated to Db server usage only
|
--json Print result as JSON string
|
||||||
--noprocess Consider no other process is running
|
--buffers Print global and per-thread buffer values
|
||||||
--dbstat Print database information
|
--outputfile <path> Path to a output txt file
|
||||||
--nodbstat Don't print database information
|
--reportfile <path> Path to a report txt file
|
||||||
--tbstat Print table information
|
--template <path> Path to a template file
|
||||||
--notbstat Don't print table information
|
|
||||||
--colstat Print column information
|
# PERLDOC
|
||||||
--nocolstat Don't print column information
|
|
||||||
--idxstat Print index information
|
You can find documentation for this module with the perldoc command.
|
||||||
--noidxstat Don't print index information
|
|
||||||
--nomyisamstat Don't print MyIsam information
|
perldoc mysqltuner
|
||||||
--sysstat Print system information
|
|
||||||
--nosysstat Don't print system information
|
## INTERNALS
|
||||||
--nostructstat Don't print table structures information
|
|
||||||
--pfstat Print Performance schema
|
[https://github.com/major/MySQLTuner-perl/blob/master/INTERNALS.md](https://github.com/major/MySQLTuner-perl/blob/master/INTERNALS.md)
|
||||||
--nopfstat Don't print Performance schema
|
|
||||||
--bannedports Ports banned separated by comma (,)
|
Internal documentation
|
||||||
--server-log Define specific error_log to analyze
|
|
||||||
--maxportallowed Number of open ports allowable on this host
|
# AUTHORS
|
||||||
--buffers Print global and per-thread buffer values
|
|
||||||
|
Major Hayden - major@mhtx.net
|
||||||
# PERLDOC
|
|
||||||
|
# CONTRIBUTORS
|
||||||
You can find documentation for this module with the perldoc command.
|
|
||||||
|
- Matthew Montgomery
|
||||||
perldoc mysqltuner
|
- Paul Kehrer
|
||||||
|
- Dave Burgess
|
||||||
## INTERNALS
|
- Jonathan Hinds
|
||||||
|
- Mike Jackson
|
||||||
[https://github.com/major/MySQLTuner-perl/blob/master/INTERNALS.md](https://github.com/major/MySQLTuner-perl/blob/master/INTERNALS.md)
|
- Nils Breunese
|
||||||
|
- Shawn Ashlee
|
||||||
Internal documentation
|
- Luuk Vosslamber
|
||||||
|
- Ville Skytta
|
||||||
# AUTHORS
|
- Trent Hornibrook
|
||||||
|
- Jason Gill
|
||||||
Major Hayden - major@mhtx.net
|
- Mark Imbriaco
|
||||||
Jean-Marie Renouard - jmrenouard@gmail.com
|
- Greg Eden
|
||||||
|
- Aubin Galinotti
|
||||||
# CONTRIBUTORS
|
- Giovanni Bechis
|
||||||
|
- Bill Bradford
|
||||||
- Matthew Montgomery
|
- Ryan Novosielski
|
||||||
- Paul Kehrer
|
- Michael Scheidell
|
||||||
- Dave Burgess
|
- Blair Christensen
|
||||||
- Jonathan Hinds
|
- Hans du Plooy
|
||||||
- Mike Jackson
|
- Victor Trac
|
||||||
- Nils Breunese
|
- Everett Barnes
|
||||||
- Shawn Ashlee
|
- Tom Krouper
|
||||||
- Luuk Vosslamber
|
- Gary Barrueto
|
||||||
- Ville Skytta
|
- Simon Greenaway
|
||||||
- Trent Hornibrook
|
- Adam Stein
|
||||||
- Jason Gill
|
- Isart Montane
|
||||||
- Mark Imbriaco
|
- Baptiste M.
|
||||||
- Greg Eden
|
- Cole Turner
|
||||||
- Aubin Galinotti
|
- Major Hayden
|
||||||
- Giovanni Bechis
|
- Joe Ashcraft
|
||||||
- Bill Bradford
|
- Jean-Marie Renouard
|
||||||
- Ryan Novosielski
|
- Stephan GroBberndt
|
||||||
- Michael Scheidell
|
- Christian Loos
|
||||||
- Blair Christensen
|
|
||||||
- Hans du Plooy
|
# SUPPORT
|
||||||
- Victor Trac
|
|
||||||
- Everett Barnes
|
Bug reports, feature requests, and downloads at http://mysqltuner.pl/
|
||||||
- Tom Krouper
|
|
||||||
- Gary Barrueto
|
Bug tracker can be found at https://github.com/major/MySQLTuner-perl/issues
|
||||||
- Simon Greenaway
|
|
||||||
- Adam Stein
|
Maintained by Major Hayden (major\\@mhtx.net) - Licensed under GPL
|
||||||
- Isart Montane
|
|
||||||
- Baptiste M.
|
# SOURCE CODE
|
||||||
- Cole Turner
|
|
||||||
- Major Hayden
|
[https://github.com/major/MySQLTuner-perl](https://github.com/major/MySQLTuner-perl)
|
||||||
- Joe Ashcraft
|
|
||||||
- Jean-Marie Renouard
|
git clone https://github.com/major/MySQLTuner-perl.git
|
||||||
- Stephan GroBberndt
|
|
||||||
- Christian Loos
|
# COPYRIGHT AND LICENSE
|
||||||
- Long Radix
|
|
||||||
|
Copyright (C) 2006-2018 Major Hayden - major@mhtx.net
|
||||||
# SUPPORT
|
|
||||||
|
For the latest updates, please visit http://mysqltuner.pl/
|
||||||
Bug reports, feature requests, and downloads at http://mysqltuner.pl/
|
|
||||||
|
Git repository available at https://github.com/major/MySQLTuner-perl
|
||||||
Bug tracker can be found at https://github.com/major/MySQLTuner-perl/issues
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
Maintained by Jean-Marie Renouard (jmrenouard\\@gmail.com) - Licensed under GPL
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
# SOURCE CODE
|
(at your option) any later version.
|
||||||
|
|
||||||
[https://github.com/major/MySQLTuner-perl](https://github.com/major/MySQLTuner-perl)
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
git clone https://github.com/major/MySQLTuner-perl.git
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
# COPYRIGHT AND LICENSE
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
Copyright (C) 2006-2023 Major Hayden - major@mhtx.net
|
You should have received a copy of the GNU General Public License
|
||||||
\# Copyright (C) 2015-2023 Jean-Marie Renouard - jmrenouard@gmail.com
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
For the latest updates, please visit http://mysqltuner.pl/
|
|
||||||
|
|
||||||
Git repository available at https://github.com/major/MySQLTuner-perl
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
|
|
||||||
See the GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
142
Vagrant/Vagrantfile
vendored
142
Vagrant/Vagrantfile
vendored
|
@ -1,71 +1,71 @@
|
||||||
# -*- mode: ruby -*-
|
# -*- mode: ruby -*-
|
||||||
# vi: set ft=ruby :
|
# vi: set ft=ruby :
|
||||||
|
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
config.vm.box = "generic/fedora30"
|
config.vm.box = "generic/fedora30"
|
||||||
config.vm.network "private_network", ip: "192.168.50.10", virtualbox__intnet: false
|
config.vm.network "private_network", ip: "192.168.50.10", virtualbox__intnet: false
|
||||||
|
|
||||||
if Vagrant.has_plugin? "vagrant-vbguest"
|
if Vagrant.has_plugin? "vagrant-vbguest"
|
||||||
config.vbguest.no_install = true
|
config.vbguest.no_install = true
|
||||||
config.vbguest.auto_update = false
|
config.vbguest.auto_update = false
|
||||||
config.vbguest.no_remote = true
|
config.vbguest.no_remote = true
|
||||||
end
|
end
|
||||||
config.hostmanager.enabled = true
|
config.hostmanager.enabled = true
|
||||||
config.hostmanager.manage_host = false
|
config.hostmanager.manage_host = false
|
||||||
config.hostmanager.manage_guest = true
|
config.hostmanager.manage_guest = true
|
||||||
config.hostmanager.ignore_private_ip = false
|
config.hostmanager.ignore_private_ip = false
|
||||||
config.hostmanager.include_offline = true
|
config.hostmanager.include_offline = true
|
||||||
|
|
||||||
config.vm.network "public_network"
|
config.vm.network "public_network"
|
||||||
config.vm.hostname = 'fedora-generic'
|
config.vm.hostname = 'fedora-generic'
|
||||||
config.hostmanager.aliases = %w(fedora-generic.localdomain fedora-generic.local fcg.local)
|
config.hostmanager.aliases = %w(fedora-generic.localdomain fedora-generic.local fcg.local)
|
||||||
|
|
||||||
config.vm.synced_folder ".", "/data"
|
config.vm.synced_folder ".", "/data"
|
||||||
|
|
||||||
config.vm.provider "virtualbox" do |vb|
|
config.vm.provider "virtualbox" do |vb|
|
||||||
vb.name="fedora-generic"
|
vb.name="fedora-generic"
|
||||||
vb.gui = false
|
vb.gui = false
|
||||||
vb.memory = "3036"
|
vb.memory = "3036"
|
||||||
vb.cpus = 4
|
vb.cpus = 4
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.provision "shell", inline: <<-SHELL
|
config.vm.provision "shell", inline: <<-SHELL
|
||||||
echo "secret" | sudo passwd --stdin root
|
echo "secret" | sudo passwd --stdin root
|
||||||
echo "secret" | sudo passwd --stdin vagrant
|
echo "secret" | sudo passwd --stdin vagrant
|
||||||
sudo cp -pr ~vagrant/.ssh /root
|
sudo cp -pr ~vagrant/.ssh /root
|
||||||
sudo chown -R root.root /root/.ssh
|
sudo chown -R root.root /root/.ssh
|
||||||
|
|
||||||
sudo dnf -y update
|
sudo dnf -y update
|
||||||
sudo dnf -y install telnet vim-enhanced net-tools git python python2-pip python34-PyYAML moreutils net-tools python-psutil perl-WWW-Mechanize-GZip perl-App-cpanminus perl-List-MoreUtils vim-enhanced unzip zip jq youtube-dl ffmpeg make mariadb psmisc PyYAML tofrodos python3 chromedriver wget
|
sudo dnf -y install telnet vim-enhanced net-tools git python python2-pip python34-PyYAML moreutils net-tools python-psutil perl-WWW-Mechanize-GZip perl-App-cpanminus perl-List-MoreUtils vim-enhanced unzip zip jq youtube-dl ffmpeg make mariadb psmisc PyYAML tofrodos python3 chromedriver wget
|
||||||
sudo dnf -y install python34-pip moreutils net-tools python-psutil perl-WWW-Mechanize-GZip perl-App-cpanminus perl-List-MoreUtils vim-enhanced unzip zip jq youtube-dl ffmpeg make mariadb psmisc PyYAML tofrodos python3 wget python-beautifulsoup4 npm rclone golang yum-utils device-mapper-persistent-data lvm2 docker
|
sudo dnf -y install python34-pip moreutils net-tools python-psutil perl-WWW-Mechanize-GZip perl-App-cpanminus perl-List-MoreUtils vim-enhanced unzip zip jq youtube-dl ffmpeg make mariadb psmisc PyYAML tofrodos python3 wget python-beautifulsoup4 npm rclone golang yum-utils device-mapper-persistent-data lvm2 docker
|
||||||
|
|
||||||
echo "alias h='function hdi(){ howdoi \$* -c -n 5; }; hdi'" >> /tmp/util.sh
|
echo "alias h='function hdi(){ howdoi \$* -c -n 5; }; hdi'" >> /tmp/util.sh
|
||||||
echo "alias s=sudo" >> /tmp/util.sh
|
echo "alias s=sudo" >> /tmp/util.sh
|
||||||
echo "alias h=history" >> /tmp/util.sh
|
echo "alias h=history" >> /tmp/util.sh
|
||||||
echo "alias hserver='python -m http.server 8000'" >> /tmp/util.sh
|
echo "alias hserver='python -m http.server 8000'" >> /tmp/util.sh
|
||||||
sudo cp /tmp/util.sh /etc/profile.d
|
sudo cp /tmp/util.sh /etc/profile.d
|
||||||
cat /tmp/util.sh
|
cat /tmp/util.sh
|
||||||
|
|
||||||
sudo dnf install -y yum-utils device-mapper-persistent-data lvm2
|
sudo dnf install -y yum-utils device-mapper-persistent-data lvm2
|
||||||
sudo dnf -y install dnf-plugins-core
|
sudo dnf -y install dnf-plugins-core
|
||||||
sudo dnf config-manager \
|
sudo dnf config-manager \
|
||||||
--add-repo \
|
--add-repo \
|
||||||
https://download.docker.com/linux/fedora/docker-ce.repo
|
https://download.docker.com/linux/fedora/docker-ce.repo
|
||||||
|
|
||||||
sudo dnf -y install docker-ce docker-ce-cli containerd.io
|
sudo dnf -y install docker-ce docker-ce-cli containerd.io
|
||||||
dnf list docker-ce --showduplicates | sort -r
|
dnf list docker-ce --showduplicates | sort -r
|
||||||
|
|
||||||
sudo systemctl start docker
|
sudo systemctl start docker
|
||||||
sudo systemctl enable docker
|
sudo systemctl enable docker
|
||||||
sudo usermod -aG docker vagrant
|
sudo usermod -aG docker vagrant
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
|
|
||||||
true
|
true
|
||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
# Install container
|
# Install container
|
||||||
sudo systemctl restart docker
|
sudo systemctl restart docker
|
||||||
SHELL
|
SHELL
|
||||||
config.vm.provision :hostmanager
|
config.vm.provision :hostmanager
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
56
build/bashrc
56
build/bashrc
|
@ -1,41 +1,11 @@
|
||||||
# Some Alias
|
|
||||||
alias h=history
|
|
||||||
alias s=sudo
|
|
||||||
alias rsh='ssh -l root'
|
|
||||||
alias lh='ls -lsh'
|
|
||||||
alias ll='ls -ls'
|
|
||||||
alias la='ls -lsa'
|
|
||||||
|
|
||||||
alias gst='git status'
|
alias gst='git status'
|
||||||
alias grm='git rm -f'
|
|
||||||
alias gadd='git add'
|
|
||||||
alias gcm='git commit -m'
|
alias gcm='git commit -m'
|
||||||
alias gps='git push'
|
|
||||||
alias gpl='git pull'
|
|
||||||
alias glg='git log'
|
|
||||||
alias gmh='git log --follow -p --'
|
alias gmh='git log --follow -p --'
|
||||||
alias gbl='git blame'
|
alias ll='ls -ls'
|
||||||
alias grs='git reset --soft HEAD~1'
|
alias lh='ls -lsh'
|
||||||
alias grh='git reset --hard HEAD~1'
|
alias la='ls -lsa'
|
||||||
alias serve="python -m $(python -c 'import sys; print("http.server" if sys.version_info[:2] > (2,7) else "SimpleHTTPServer")')"
|
|
||||||
|
|
||||||
|
|
||||||
gunt() {
|
|
||||||
git status | \
|
|
||||||
grep -vE '(Changes to be committed:| to publish your local commits|git add|git restore|On branch|Your branch|Untracked files|nclude in what will b|but untracked files present|no changes added to commit|modified:|deleted:|Changes not staged for commit)' |\
|
|
||||||
sort | uniq | \
|
|
||||||
xargs -n 1 $*
|
|
||||||
}
|
|
||||||
|
|
||||||
alias gam='git status | grep "modified" | cut -d: -f2 | xargs -n 1 git add'
|
alias gam='git status | grep "modified" | cut -d: -f2 | xargs -n 1 git add'
|
||||||
|
alias serve="python -m $(python -c 'import sys; print("http.server" if sys.version_info[:2] > (2,7) else "SimpleHTTPServer")')"
|
||||||
gad() {
|
|
||||||
git status | \
|
|
||||||
grep 'deleted:' | \
|
|
||||||
cut -d: -f2- | \
|
|
||||||
sort | uniq | \
|
|
||||||
xargs -n 1 git rm -f
|
|
||||||
}
|
|
||||||
|
|
||||||
dcmd()
|
dcmd()
|
||||||
{
|
{
|
||||||
|
@ -96,20 +66,4 @@ exec_mysqls()
|
||||||
echo "* Executing $sqlfile on $container_name"
|
echo "* Executing $sqlfile on $container_name"
|
||||||
cat $sqlfile | mysql -u root -h 127.0.0.1 -P $container_port
|
cat $sqlfile | mysql -u root -h 127.0.0.1 -P $container_port
|
||||||
done < "$input"
|
done < "$input"
|
||||||
}
|
}
|
||||||
|
|
||||||
gen_mysqlalias()
|
|
||||||
{
|
|
||||||
input="$1"
|
|
||||||
|
|
||||||
while IFS='' read -r line
|
|
||||||
do
|
|
||||||
[ -z "$line" ] && continue
|
|
||||||
container_port=$(echo "$line" | cut -d\; -f1)
|
|
||||||
container_name=$(echo "$line" | cut -d\; -f2)
|
|
||||||
container_datadir=$(echo "$line" | cut -d\; -f3)
|
|
||||||
image_name=$(echo "$line" | cut -d\; -f4)
|
|
||||||
|
|
||||||
alias mysql_$container_name="mysql -u root -h 127.0.0.1 -P $container_port"
|
|
||||||
done < "$input"
|
|
||||||
}
|
|
4
build/build_rpm.sh
Normal file → Executable file
4
build/build_rpm.sh
Normal file → Executable file
|
@ -1,10 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
BUILD_DIR="$(dirname $(readlink -f "$0"))"
|
BUILD_DIR=`dirname $(readlink -f $0)`
|
||||||
|
|
||||||
VERSION=$(grep -Ei 'my \$tunerversion' $BUILD_DIR/../mysqltuner.pl | grep = | cut -d\" -f2)
|
VERSION=$(grep -Ei 'my \$tunerversion' $BUILD_DIR/../mysqltuner.pl | grep = | cut -d\" -f2)
|
||||||
cd $BUILD_DIR
|
cd $BUILD_DIR
|
||||||
sh ./clean.sh
|
sh ./clean.sh
|
||||||
|
|
||||||
perl -pe "s/%VERSION%/$VERSION/g" mysqltuner.spec.tpl > mysqltuner.spec
|
perl -pe "s/%VERSION%/$VERSION/g" mysqltuner.spec.tpl > mysqltuner.spec
|
||||||
mkdir -p $BUILD_DIR/mysqltuner-$VERSION
|
mkdir -p $BUILD_DIR/mysqltuner-$VERSION
|
||||||
|
|
0
build/clean.sh
Normal file → Executable file
0
build/clean.sh
Normal file → Executable file
0
build/deployOn
Normal file → Executable file
0
build/deployOn
Normal file → Executable file
|
@ -1,13 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Update Feature list
|
|
||||||
(
|
|
||||||
export LANG=C
|
|
||||||
echo -e "Features list for option: --feature (dev only)\n---\n\n"
|
|
||||||
grep -E '^sub ' ./mysqltuner.pl | \
|
|
||||||
perl -pe 's/sub //;s/\s*\{//g' | \
|
|
||||||
sort -n | \
|
|
||||||
perl -pe 's/^/* /g' | \
|
|
||||||
grep -vE '(get_|close_|check_|memerror|cpu_cores|compare_tuner_version|grep_file_contents|update_tuner_version|mysql_version_|calculations|merge_hash|os_setup|pretty_uptime|update_tuner_version|human_size|string2file|file2|arr2|dump|which|percentage|trim|is_|hr_|info|print|select|wrap|remove_)'
|
|
||||||
) > ./FEATURES.md
|
|
||||||
cat ./FEATURES.md
|
|
|
@ -1,7 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
apt install -y cpanminus libpod-markdown-perl libwww-mechanize-gzip-perl perltidy dos2unix
|
|
||||||
|
|
||||||
cpanm File::Util
|
|
||||||
|
|
||||||
#####
|
|
|
@ -1,11 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
[ -f "./.env" ] && source ./.env
|
|
||||||
[ -f "../.env" ] && source ../.env
|
|
||||||
|
|
||||||
VERSION=$1
|
|
||||||
|
|
||||||
docker login -u $DOCKER_USER_LOGIN -p $DOCKER_USER_PASSWORD
|
|
||||||
docker tag jmrenouard/mysqltuner:latest jmrenouard/mysqltuner:$VERSION
|
|
||||||
docker push jmrenouard/mysqltuner:latest
|
|
||||||
docker push jmrenouard/mysqltuner:$VERSION
|
|
|
@ -14,15 +14,14 @@ my $i=1;
|
||||||
while (my $row = <$fh>) {
|
while (my $row = <$fh>) {
|
||||||
chomp $row;
|
chomp $row;
|
||||||
if ($row =~ /^$headerSep/) {
|
if ($row =~ /^$headerSep/) {
|
||||||
print "</pre>\n";
|
print "</pre>\n";
|
||||||
$row =~ s/$headerSep//g;
|
$row =~ s/$headerSep//g;
|
||||||
print "<H3 >$row</H3>\n";
|
print "<H3 >$row</H3>\n";
|
||||||
print "<pre>";
|
print "<pre>";
|
||||||
$i++;
|
$i++;
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
print "$row\n" unless $row =~ /^\s*$/;
|
print "$row\n" unless $row =~ /^\s*$/;
|
||||||
}
|
}
|
||||||
print "</pre>\n";
|
print "</pre>\n";
|
||||||
close $fh;
|
close $fh;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env perl
|
#!/usr/bin/perl
|
||||||
use warnings;
|
use warnings;
|
||||||
use strict;
|
use strict;
|
||||||
use WWW::Mechanize::GZip;
|
use WWW::Mechanize::GZip;
|
||||||
|
@ -49,7 +49,7 @@ File::Util->flock_rules( qw/ IGNORE/ );
|
||||||
|
|
||||||
my @versions;
|
my @versions;
|
||||||
my $temp;
|
my $temp;
|
||||||
unlink './vulnerabilities.csv' if -f './vulnerabilities.csv';
|
unlink '../vulnerabilities.csv' if -f '../vulnerabilities.csv';
|
||||||
open(CVE, 'cve.csv') or die("Could not open file.");
|
open(CVE, 'cve.csv') or die("Could not open file.");
|
||||||
foreach my $line (<CVE>) {
|
foreach my $line (<CVE>) {
|
||||||
if ($line =~ /(mysql|mariadb|percona)/i
|
if ($line =~ /(mysql|mariadb|percona)/i
|
||||||
|
@ -69,12 +69,11 @@ foreach my $line (<CVE>) {
|
||||||
#print $vers."\n".Dumper @nb;
|
#print $vers."\n".Dumper @nb;
|
||||||
#print "$line";
|
#print "$line";
|
||||||
#exit 0 if ($line =~/before/i) ;
|
#exit 0 if ($line =~/before/i) ;
|
||||||
$f->write_file('file' => './vulnerabilities.csv', 'content' => "$nb[0].$nb[1].$nb[2];$nb[0];$nb[1];$nb[2];$line", 'mode' => 'append');
|
$f->write_file('file' => '../vulnerabilities.csv', 'content' => "$nb[0].$nb[1].$nb[2];$nb[0];$nb[1];$nb[2];$line", 'mode' => 'append');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close(CVE);
|
close(CVE);
|
||||||
chmod 0644, "./cve.csv", "../vulnerabilities.csv";
|
|
||||||
#unlink ('cve.csv') if (-f 'cve.csv');
|
#unlink ('cve.csv') if (-f 'cve.csv');
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
|
@ -9,12 +9,7 @@ perltidy -b mysqltuner.pl
|
||||||
echo "* Update CVE list"
|
echo "* Update CVE list"
|
||||||
perl updateCVElist.pl
|
perl updateCVElist.pl
|
||||||
dos2unix ../mysqltuner.pl
|
dos2unix ../mysqltuner.pl
|
||||||
|
git add ../vulnerabilities.csv ../mysqltuner.pl ../USAGE.md
|
||||||
# Update Feature list
|
|
||||||
bash ./genFeatures.sh
|
|
||||||
|
|
||||||
git add ../vulnerabilities.csv ../mysqltuner.pl ../USAGE.md ../FEATURES.md
|
|
||||||
git commit -m 'Update Vulnerabilities list
|
git commit -m 'Update Vulnerabilities list
|
||||||
Indenting mysqltuner
|
Indenting mysqltuner
|
||||||
Update Usage information
|
Update Usage information'
|
||||||
Regenerate fetures list'
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
"big5","big5_chinese_ci","Big5 Traditional Chinese","2""dec8","dec8_swedish_ci","DEC West European","1""cp850","cp850_general_ci","DOS West European","1""hp8","hp8_english_ci","HP West European","1""koi8r","koi8r_general_ci","KOI8-R Relcom Russian","1""latin1","latin1_swedish_ci","cp1252 West European","1""latin2","latin2_general_ci","ISO 8859-2 Central European","1""swe7","swe7_swedish_ci","7bit Swedish","1""ascii","ascii_general_ci","US ASCII","1""ujis","ujis_japanese_ci","EUC-JP Japanese","3""sjis","sjis_japanese_ci","Shift-JIS Japanese","2""hebrew","hebrew_general_ci","ISO 8859-8 Hebrew","1""tis620","tis620_thai_ci","TIS620 Thai","1""euckr","euckr_korean_ci","EUC-KR Korean","2""koi8u","koi8u_general_ci","KOI8-U Ukrainian","1""gb2312","gb2312_chinese_ci","GB2312 Simplified Chinese","2""greek","greek_general_ci","ISO 8859-7 Greek","1""cp1250","cp1250_general_ci","Windows Central European","1""gbk","gbk_chinese_ci","GBK Simplified Chinese","2""latin5","latin5_turkish_ci","ISO 8859-9 Turkish","1""armscii8","armscii8_general_ci","ARMSCII-8 Armenian","1""utf8","utf8_general_ci","UTF-8 Unicode","3""ucs2","ucs2_general_ci","UCS-2 Unicode","2""cp866","cp866_general_ci","DOS Russian","1""keybcs2","keybcs2_general_ci","DOS Kamenicky Czech-Slovak","1""macce","macce_general_ci","Mac Central European","1""macroman","macroman_general_ci","Mac West European","1""cp852","cp852_general_ci","DOS Central European","1""latin7","latin7_general_ci","ISO 8859-13 Baltic","1""utf8mb4","utf8mb4_general_ci","UTF-8 Unicode","4""cp1251","cp1251_general_ci","Windows Cyrillic","1""utf16","utf16_general_ci","UTF-16 Unicode","4""utf16le","utf16le_general_ci","UTF-16LE Unicode","4""cp1256","cp1256_general_ci","Windows Arabic","1""cp1257","cp1257_general_ci","Windows Baltic","1""utf32","utf32_general_ci","UTF-32 Unicode","4""binary","binary","Binary pseudo charset","1""geostd8","geostd8_general_ci","GEOSTD8 Georgian","1""cp932","cp932_japanese_ci","SJIS for Windows Japanese","2""eucjpms","eucjpms_japanese_ci","UJIS for Windows Japanese","3"
|
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
"NULL"
|
|
|
|
@ -1 +0,0 @@
|
||||||
"MRG_MyISAM","YES","Collection of identical MyISAM tables","NO","NO","NO""CSV","YES","Stores tables as CSV files","NO","NO","NO""SEQUENCE","YES","Generated tables filled with sequential values","YES","NO","YES""MyISAM","YES","Non-transactional engine with good performance and small data footprint","NO","NO","NO""MEMORY","YES","Hash based, stored in memory, useful for temporary tables","NO","NO","NO""InnoDB","DEFAULT","Supports transactions, row-level locking, foreign keys and encryption for tables","YES","YES","YES""Aria","YES","Crash-safe tables with MyISAM heritage","NO","NO","NO""PERFORMANCE_SCHEMA","YES","Performance Schema","NO","NO","NO"
|
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
"0","8192","1016","6989","2564","0","0","0","0","0","193","1512913","4.020749567717339","31518.36420074582","568","9401","10115","11.833086810691444","195.85008645653215","210.72477656715486","20519569","1000","0","73","254","0","5.291556425907793","0","4010","3","0","0"
|
|
|
|
@ -1 +0,0 @@
|
||||||
"1024","0","0","0","0","0""2048","0","0","0","0","0""4096","0","0","0","0","0""8192","0","0","0","0","0""16384","0","0","0","0","0"
|
|
|
|
@ -1 +0,0 @@
|
||||||
"1024","0","0","0","0","0""2048","0","0","0","0","0""4096","0","0","0","0","0""8192","0","0","0","0","0""16384","0","0","0","0","0"
|
|
|
|
@ -1 +0,0 @@
|
||||||
"1024","0","0","0","0","0""2048","0","0","0","0","0""4096","0","0","0","0","0""8192","0","0","0","0","0""16384","0","0","0","0","0"
|
|
|
|
@ -1 +0,0 @@
|
||||||
"1024","0","0","0","0","0""2048","0","0","0","0","0""4096","0","0","0","0","0""8192","0","0","0","0","0""16384","0","0","0","0","0"
|
|
|
|
@ -1 +0,0 @@
|
||||||
"a""about""an""are""as""at""be""by""com""de""en""for""from""how""i""in""is""it""la""of""on""or""that""the""this""to""was""what""when""where""who""will""with""und""the""www"
|
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
"dict0dict.cc:922","dict0dict.cc","922","15""log0log.cc:698","log0log.cc","698","9""btr0sea.cc:190","btr0sea.cc","190","33""btr0sea.cc:190","btr0sea.cc","190","1""buf_block_t::lock","combined buf0buf.cc","1475","20"
|
|
|
|
@ -1 +0,0 @@
|
||||||
"11","ID","0","1","524292","0""11","FOR_NAME","1","1","524292","0""11","REF_NAME","2","1","524292","0""11","N_COLS","3","6","0","4""12","ID","0","1","524292","0""12","POS","1","6","0","4""12","FOR_COL_NAME","2","1","524292","0""12","REF_COL_NAME","3","1","524292","0""13","SPACE","0","6","0","4""13","NAME","1","1","524292","0""13","FLAGS","2","6","0","4""14","SPACE","0","6","0","4""14","PATH","1","1","524292","0""15","TABLE_ID","0","6","0","8""15","POS","1","6","0","4""15","BASE_POS","2","6","0","4""16","database_name","0","12","5439759","192""16","table_name","1","12","5443855","597""16","last_update","2","3","526087","4""16","n_rows","3","6","1800","8""16","clustered_index_size","4","6","1800","8""16","sum_of_other_index_sizes","5","6","1800","8""17","database_name","0","12","5439759","192""17","table_name","1","12","5443855","597""17","index_name","2","12","5439759","192""17","last_update","3","3","526087","4""17","stat_name","4","12","5439759","192""17","stat_value","5","6","1800","8""17","sample_size","6","6","1544","8""17","stat_description","7","12","5443855","3072""18","domain_id","0","6","1795","4""18","sub_id","1","6","1800","8""18","server_id","2","6","1795","4""18","seq_no","3","6","1800","8""19","emp_no","0","6","1283","4""19","birth_date","1","6","1290","3""19","first_name","2","1","524559","14""19","last_name","3","1","524559","16""19","gender","4","6","1022","1""19","hire_date","5","6","1290","3""20","dept_no","0","2","524798","4""20","dept_name","1","1","524559","40""21","emp_no","0","6","1283","4""21","dept_no","1","2","524798","4""21","from_date","2","6","1290","3""21","to_date","3","6","1290","3""22","emp_no","0","6","1283","4""22","dept_no","1","2","524798","4""22","from_date","2","6","1290","3""22","to_date","3","6","1290","3""23","emp_no","0","6","1283","4""23","title","1","1","524559","50""23","from_date","2","6","1290","3""23","to_date","3","6","1034","3""24","emp_no","0","6","1283","4""24","salary","1","6","1283","4""24","from_date","2","6","1290","3""24","to_date","3","6","1290","3"
|
|
|
|
@ -1 +0,0 @@
|
||||||
"1","./mysql/innodb_table_stats.ibd""2","./mysql/innodb_index_stats.ibd""3","./mysql/gtid_slave_pos.ibd""4","./employees/employees.ibd""5","./employees/departments.ibd""6","./employees/dept_manager.ibd""7","./employees/dept_emp.ibd""8","./employees/titles.ibd""9","./employees/salaries.ibd"
|
|
|
|
@ -1 +0,0 @@
|
||||||
"11","ID","0""12","FOR_NAME","0""13","REF_NAME","0""14","ID","0""14","POS","1""15","SPACE","0""16","SPACE","0""17","TABLE_ID","0""17","POS","1""17","BASE_POS","2""18","database_name","0""18","table_name","1""19","database_name","0""19","table_name","1""19","index_name","2""19","stat_name","3""20","domain_id","0""20","sub_id","1""21","emp_no","0""22","dept_no","0""23","dept_name","0""24","emp_no","0""24","dept_no","1""25","dept_no","0""26","emp_no","0""26","dept_no","1""27","dept_no","0""28","emp_no","0""28","title","1""28","from_date","2""29","emp_no","0""29","from_date","1"
|
|
|
|
@ -1 +0,0 @@
|
||||||
"employees/dept_emp_ibfk_1","employees/dept_emp","employees/employees","1","1""employees/dept_emp_ibfk_2","employees/dept_emp","employees/departments","1","1""employees/dept_manager_ibfk_1","employees/dept_manager","employees/employees","1","1""employees/dept_manager_ibfk_2","employees/dept_manager","employees/departments","1","1""employees/salaries_ibfk_1","employees/salaries","employees/employees","1","1""employees/titles_ibfk_1","employees/titles","employees/employees","1","1"
|
|
|
|
@ -1 +0,0 @@
|
||||||
"employees/dept_emp_ibfk_1","emp_no","emp_no","0""employees/dept_emp_ibfk_2","dept_no","dept_no","0""employees/dept_manager_ibfk_1","emp_no","emp_no","0""employees/dept_manager_ibfk_2","dept_no","dept_no","0""employees/salaries_ibfk_1","emp_no","emp_no","0""employees/titles_ibfk_1","emp_no","emp_no","0"
|
|
|
|
@ -1 +0,0 @@
|
||||||
"11","ID_IND","11","3","1","302","0","50""12","FOR_IND","11","0","1","303","0","50""13","REF_IND","11","0","1","304","0","50""14","ID_IND","12","3","2","305","0","50""15","SYS_TABLESPACES_SPACE","13","3","1","307","0","50""16","SYS_DATAFILES_SPACE","14","3","1","308","0","50""17","BASE_IDX","15","3","3","310","0","50""18","PRIMARY","16","3","2","3","1","50""19","PRIMARY","17","3","4","3","2","50""20","PRIMARY","18","3","2","3","3","50""21","PRIMARY","19","3","1","3","4","50""22","PRIMARY","20","3","1","3","5","50""23","dept_name","20","2","1","4","5","50""24","PRIMARY","21","3","2","3","6","50""25","dept_no","21","0","1","4","6","50""26","PRIMARY","22","3","2","3","7","50""27","dept_no","22","0","1","4","7","50""28","PRIMARY","23","3","3","3","8","50""29","PRIMARY","24","3","2","3","9","50"
|
|
|
|
@ -1 +0,0 @@
|
||||||
"14","SYS_DATAFILES","0","5","0","Antelope","Redundant","0","System""11","SYS_FOREIGN","0","7","0","Antelope","Redundant","0","System""12","SYS_FOREIGN_COLS","0","7","0","Antelope","Redundant","0","System""13","SYS_TABLESPACES","0","6","0","Antelope","Redundant","0","System""15","SYS_VIRTUAL","0","6","0","Antelope","Redundant","0","System""20","employees/departments","33","5","5","Barracuda","Dynamic","0","Single""22","employees/dept_emp","33","7","7","Barracuda","Dynamic","0","Single""21","employees/dept_manager","33","7","6","Barracuda","Dynamic","0","Single""19","employees/employees","33","9","4","Barracuda","Dynamic","0","Single""24","employees/salaries","33","7","9","Barracuda","Dynamic","0","Single""23","employees/titles","33","7","8","Barracuda","Dynamic","0","Single""18","mysql/gtid_slave_pos","33","7","3","Barracuda","Dynamic","0","Single""17","mysql/innodb_index_stats","33","11","2","Barracuda","Dynamic","0","Single""16","mysql/innodb_table_stats","33","9","1","Barracuda","Dynamic","0","Single"
|
|
|
|
@ -1 +0,0 @@
|
||||||
"1","mysql/innodb_table_stats","33","Barracuda","Dynamic","16384","16384","Single","4096","98304","98304""2","mysql/innodb_index_stats","33","Barracuda","Dynamic","16384","16384","Single","4096","98304","98304""3","mysql/gtid_slave_pos","33","Barracuda","Dynamic","16384","16384","Single","4096","98304","98304""4","employees/employees","33","Barracuda","Dynamic","16384","16384","Single","4096","23068672","23072768""5","employees/departments","33","Barracuda","Dynamic","16384","16384","Single","4096","114688","118784""6","employees/dept_manager","33","Barracuda","Dynamic","16384","16384","Single","4096","114688","118784""7","employees/dept_emp","33","Barracuda","Dynamic","16384","16384","Single","4096","26214400","26218496""8","employees/titles","33","Barracuda","Dynamic","16384","16384","Single","4096","28311552","28315648""9","employees/salaries","33","Barracuda","Dynamic","16384","16384","Single","4096","109051904","109056000"
|
|
|
|
@ -1 +0,0 @@
|
||||||
"14","SYS_DATAFILES","Uninitialized","0","0","0","0","0","0""11","SYS_FOREIGN","Uninitialized","0","0","0","0","0","0""12","SYS_FOREIGN_COLS","Uninitialized","0","0","0","0","0","0""13","SYS_TABLESPACES","Uninitialized","0","0","0","0","0","0""15","SYS_VIRTUAL","Uninitialized","0","0","0","0","0","0""20","employees/departments","Initialized","9","1","1","0","0","1""22","employees/dept_emp","Initialized","331570","737","353","0","0","2""21","employees/dept_manager","Initialized","24","1","1","0","0","1""19","employees/employees","Initialized","299335","929","0","0","0","1""24","employees/salaries","Initialized","2844047","1","0","86302","0","1""23","employees/titles","Initialized","442308","1252","0","0","0","1""18","mysql/gtid_slave_pos","Initialized","0","1","0","0","0","1""17","mysql/innodb_index_stats","Initialized","38","1","0","0","0","1""16","mysql/innodb_table_stats","Initialized","7","1","0","0","0","1"
|
|
|
|
@ -1 +0,0 @@
|
||||||
"0","innodb_system","0","NULL","NULL","NULL","0","0""3","mysql/gtid_slave_pos","0","NULL","NULL","NULL","0","0""2","mysql/innodb_index_stats","0","NULL","NULL","NULL","0","0""1","mysql/innodb_table_stats","0","NULL","NULL","NULL","0","0""4","employees/employees","0","NULL","NULL","NULL","0","0""5","employees/departments","0","NULL","NULL","NULL","0","0""6","employees/dept_manager","0","NULL","NULL","NULL","0","0""7","employees/dept_emp","0","NULL","NULL","NULL","0","0""8","employees/titles","0","NULL","NULL","NULL","0","0""9","employees/salaries","0","NULL","NULL","NULL","0","0"
|
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
"default","NULL","NULL","134217728","1024","2","107161","0","2","2","0","0"
|
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
"def","mysql","AddGeometryColumn","1","IN","catalog","varchar","64","64","NULL","NULL","NULL","latin1","latin1_swedish_ci","varchar(64)","PROCEDURE""def","mysql","AddGeometryColumn","2","IN","t_schema","varchar","64","64","NULL","NULL","NULL","latin1","latin1_swedish_ci","varchar(64)","PROCEDURE""def","mysql","AddGeometryColumn","3","IN","t_name","varchar","64","64","NULL","NULL","NULL","latin1","latin1_swedish_ci","varchar(64)","PROCEDURE""def","mysql","AddGeometryColumn","4","IN","geometry_column","varchar","64","64","NULL","NULL","NULL","latin1","latin1_swedish_ci","varchar(64)","PROCEDURE""def","mysql","AddGeometryColumn","5","IN","t_srid","int","NULL","NULL","10","0","NULL","NULL","NULL","int(11)","PROCEDURE""def","mysql","DropGeometryColumn","1","IN","catalog","varchar","64","64","NULL","NULL","NULL","latin1","latin1_swedish_ci","varchar(64)","PROCEDURE""def","mysql","DropGeometryColumn","2","IN","t_schema","varchar","64","64","NULL","NULL","NULL","latin1","latin1_swedish_ci","varchar(64)","PROCEDURE""def","mysql","DropGeometryColumn","3","IN","t_name","varchar","64","64","NULL","NULL","NULL","latin1","latin1_swedish_ci","varchar(64)","PROCEDURE""def","mysql","DropGeometryColumn","4","IN","geometry_column","varchar","64","64","NULL","NULL","NULL","latin1","latin1_swedish_ci","varchar(64)","PROCEDURE"
|
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
"74","root","localhost:60702","NULL","Query","0","Filling schema table","select * from information_schema.PROCESSLIST","0.209","0","0","0.000","85336","0","390","select * from information_schema.PROCESSLIST","1838""5","system user","","NULL","Daemon","0","InnoDB shutdown handler","NULL","0.000","0","0","0.000","24360","0","0","NULL","1832""4","system user","","NULL","Daemon","0","InnoDB purge worker","NULL","0.000","0","0","0.000","24360","0","0","NULL","1828""3","system user","","NULL","Daemon","0","InnoDB purge worker","NULL","0.000","0","0","0.000","24360","0","0","NULL","1827""2","system user","","NULL","Daemon","0","InnoDB purge worker","NULL","0.000","0","0","0.000","24360","0","0","NULL","1826""1","system user","","NULL","Daemon","0","InnoDB purge coordinator","NULL","0.000","0","0","0.000","24360","0","0","NULL","1825"
|
|
|
|
@ -1 +0,0 @@
|
||||||
"def","employees","dept_emp_ibfk_1","def","employees","PRIMARY","NONE","RESTRICT","CASCADE","dept_emp","employees""def","employees","dept_emp_ibfk_2","def","employees","PRIMARY","NONE","RESTRICT","CASCADE","dept_emp","departments""def","employees","dept_manager_ibfk_1","def","employees","PRIMARY","NONE","RESTRICT","CASCADE","dept_manager","employees""def","employees","dept_manager_ibfk_2","def","employees","PRIMARY","NONE","RESTRICT","CASCADE","dept_manager","departments""def","employees","salaries_ibfk_1","def","employees","PRIMARY","NONE","RESTRICT","CASCADE","salaries","employees""def","employees","titles_ibfk_1","def","employees","PRIMARY","NONE","RESTRICT","CASCADE","titles","employees"
|
|
|
|
@ -1 +0,0 @@
|
||||||
"AddGeometryColumn","def","mysql","AddGeometryColumn","PROCEDURE","","NULL","NULL","NULL","NULL","NULL","NULL","NULL","NULL","SQL","begin\n set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end","NULL","NULL","SQL","NO","CONTAINS SQL","NULL","INVOKER","2023-03-23 16:37:59","2023-03-23 16:37:59","","","root@localhost","utf8","utf8_general_ci","latin1_swedish_ci""DropGeometryColumn","def","mysql","DropGeometryColumn","PROCEDURE","","NULL","NULL","NULL","NULL","NULL","NULL","NULL","NULL","SQL","begin\n set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end","NULL","NULL","SQL","NO","CONTAINS SQL","NULL","INVOKER","2023-03-23 16:37:59","2023-03-23 16:37:59","","","root@localhost","utf8","utf8_general_ci","latin1_swedish_ci"
|
|
|
|
@ -1 +0,0 @@
|
||||||
"def","data","latin1","latin1_swedish_ci","NULL""def","employees","latin1","latin1_swedish_ci","NULL""def","information_schema","utf8","utf8_general_ci","NULL""def","mysql","latin1","latin1_swedish_ci","NULL""def","performance_schema","utf8","utf8_general_ci","NULL""def","test","latin1","latin1_swedish_ci","NULL"
|
|
|
|
@ -1 +0,0 @@
|
||||||
"''@'%'","def","test","SELECT","NO""''@'%'","def","test","INSERT","NO""''@'%'","def","test","UPDATE","NO""''@'%'","def","test","DELETE","NO""''@'%'","def","test","CREATE","NO""''@'%'","def","test","DROP","NO""''@'%'","def","test","REFERENCES","NO""''@'%'","def","test","INDEX","NO""''@'%'","def","test","ALTER","NO""''@'%'","def","test","CREATE TEMPORARY TABLES","NO""''@'%'","def","test","LOCK TABLES","NO""''@'%'","def","test","CREATE VIEW","NO""''@'%'","def","test","SHOW VIEW","NO""''@'%'","def","test","CREATE ROUTINE","NO""''@'%'","def","test","EVENT","NO""''@'%'","def","test","TRIGGER","NO""''@'%'","def","test\\_%","SELECT","NO""''@'%'","def","test\\_%","INSERT","NO""''@'%'","def","test\\_%","UPDATE","NO""''@'%'","def","test\\_%","DELETE","NO""''@'%'","def","test\\_%","CREATE","NO""''@'%'","def","test\\_%","DROP","NO""''@'%'","def","test\\_%","REFERENCES","NO""''@'%'","def","test\\_%","INDEX","NO""''@'%'","def","test\\_%","ALTER","NO""''@'%'","def","test\\_%","CREATE TEMPORARY TABLES","NO""''@'%'","def","test\\_%","LOCK TABLES","NO""''@'%'","def","test\\_%","CREATE VIEW","NO""''@'%'","def","test\\_%","SHOW VIEW","NO""''@'%'","def","test\\_%","CREATE ROUTINE","NO""''@'%'","def","test\\_%","EVENT","NO""''@'%'","def","test\\_%","TRIGGER","NO"
|
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
"-1","Not defined","-1","LOCAL_CS["Spatial reference wasn't specified",LOCAL_DATUM["Unknown",0],UNIT["m",1.0],AXIS["x",EAST],AXIS["y",NORTH]]""0","EPSG","404000","LOCAL_CS["Wildcard 2D cartesian plane in metric unit",LOCAL_DATUM["Unknown",0],UNIT["m",1.0],AXIS["x",EAST],AXIS["y",NORTH],AUTHORITY["EPSG","404000"]]"
|
|
Can't render this file because it contains an unexpected character in line 1 and column 35.
|
|
@ -1 +0,0 @@
|
||||||
"ADDDATE""BIT_AND""BIT_OR""BIT_XOR""CAST""COUNT""CUME_DIST""CURDATE""CURTIME""DATE_ADD""DATE_SUB""DENSE_RANK""EXTRACT""FIRST_VALUE""GROUP_CONCAT""LAG""LEAD""MAX""MID""MIN""NOW""NTH_VALUE""NTILE""POSITION""PERCENT_RANK""RANK""ROW_NUMBER""SESSION_USER""STD""STDDEV""STDDEV_POP""STDDEV_SAMP""SUBDATE""SUBSTR""SUBSTRING""SUM""SYSDATE""SYSTEM_USER""TRIM""VARIANCE""VAR_POP""VAR_SAMP""ABS""ACOS""ADDTIME""AES_DECRYPT""AES_ENCRYPT""AREA""ASBINARY""ASIN""ASTEXT""ASWKB""ASWKT""ATAN""ATAN2""BENCHMARK""BIN""BINLOG_GTID_POS""BIT_COUNT""BIT_LENGTH""BOUNDARY""BUFFER""CEIL""CEILING""CENTROID""CHARACTER_LENGTH""CHAR_LENGTH""COERCIBILITY""COLUMN_CHECK""COLUMN_EXISTS""COLUMN_LIST""COLUMN_JSON""COMPRESS""CONCAT""CONCAT_WS""CONNECTION_ID""CONV""CONVERT_TZ""CONVEXHULL""COS""COT""CRC32""CROSSES""DATEDIFF""DATE_FORMAT""DAYNAME""DAYOFMONTH""DAYOFWEEK""DAYOFYEAR""DECODE""DEGREES""DECODE_HISTOGRAM""DES_DECRYPT""DES_ENCRYPT""DIMENSION""DISJOINT""ELT""ENCODE""ENCRYPT""ENDPOINT""ENVELOPE""EQUALS""EXP""EXPORT_SET""EXTERIORRING""EXTRACTVALUE""FIELD""FIND_IN_SET""FLOOR""FORMAT""FOUND_ROWS""FROM_BASE64""FROM_DAYS""FROM_UNIXTIME""GEOMCOLLFROMTEXT""GEOMCOLLFROMWKB""GEOMETRYCOLLECTIONFROMTEXT""GEOMETRYCOLLECTIONFROMWKB""GEOMETRYFROMTEXT""GEOMETRYFROMWKB""GEOMETRYN""GEOMETRYTYPE""GEOMFROMTEXT""GEOMFROMWKB""GET_LOCK""GLENGTH""GREATEST""HEX""IFNULL""INET_ATON""INET_NTOA""INET6_ATON""INET6_NTOA""IS_IPV4""IS_IPV6""IS_IPV4_COMPAT""IS_IPV4_MAPPED""INSTR""INTERIORRINGN""INTERSECTS""ISCLOSED""ISEMPTY""ISNULL""ISRING""ISSIMPLE""IS_FREE_LOCK""IS_USED_LOCK""JSON_ARRAY""JSON_ARRAY_APPEND""JSON_ARRAY_INSERT""JSON_COMPACT""JSON_CONTAINS""JSON_CONTAINS_PATH""JSON_DEPTH""JSON_DETAILED""JSON_EXISTS""JSON_EXTRACT""JSON_INSERT""JSON_KEYS""JSON_LENGTH""JSON_LOOSE""JSON_MERGE""JSON_MERGE_PATCH""JSON_MERGE_PRESERVE""JSON_QUERY""JSON_QUOTE""JSON_OBJECT""JSON_REMOVE""JSON_REPLACE""JSON_SET""JSON_SEARCH""JSON_TYPE""JSON_UNQUOTE""JSON_VALID""JSON_VALUE""LAST_DAY""LAST_INSERT_ID""LCASE""LEAST""LENGTH""LINEFROMTEXT""LINEFROMWKB""LINESTRINGFROMTEXT""LINESTRINGFROMWKB""LN""LOAD_FILE""LOCATE""LOG""LOG10""LOG2""LOWER""LPAD""LTRIM""MAKEDATE""MAKETIME""MAKE_SET""MASTER_GTID_WAIT""MASTER_POS_WAIT""MBRCONTAINS""MBRDISJOINT""MBREQUAL""MBREQUALS""MBRINTERSECTS""MBROVERLAPS""MBRTOUCHES""MBRWITHIN""MD5""MLINEFROMTEXT""MLINEFROMWKB""MONTHNAME""MPOINTFROMTEXT""MPOINTFROMWKB""MPOLYFROMTEXT""MPOLYFROMWKB""MULTILINESTRINGFROMTEXT""MULTILINESTRINGFROMWKB""MULTIPOINTFROMTEXT""MULTIPOINTFROMWKB""MULTIPOLYGONFROMTEXT""MULTIPOLYGONFROMWKB""NAME_CONST""NULLIF""NUMGEOMETRIES""NUMINTERIORRINGS""NUMPOINTS""OCT""OCTET_LENGTH""ORD""OVERLAPS""PERIOD_ADD""PERIOD_DIFF""PI""POINTFROMTEXT""POINTFROMWKB""POINTN""POINTONSURFACE""POLYFROMTEXT""POLYFROMWKB""POLYGONFROMTEXT""POLYGONFROMWKB""POW""POWER""QUOTE""REGEXP_INSTR""REGEXP_REPLACE""REGEXP_SUBSTR""RADIANS""RAND""RELEASE_LOCK""REVERSE""ROUND""RPAD""RTRIM""SEC_TO_TIME""SHA""SHA1""SHA2""SIGN""SIN""SLEEP""SOUNDEX""SPACE""SQRT""SRID""STARTPOINT""STRCMP""STR_TO_DATE""ST_AREA""ST_ASBINARY""ST_ASGEOJSON""ST_ASTEXT""ST_ASWKB""ST_ASWKT""ST_BOUNDARY""ST_BUFFER""ST_CENTROID""ST_CONTAINS""ST_CONVEXHULL""ST_CROSSES""ST_DIFFERENCE""ST_DIMENSION""ST_DISJOINT""ST_DISTANCE""ST_ENDPOINT""ST_ENVELOPE""ST_EQUALS""ST_EXTERIORRING""ST_GEOMCOLLFROMTEXT""ST_GEOMCOLLFROMWKB""ST_GEOMETRYCOLLECTIONFROMTEXT""ST_GEOMETRYCOLLECTIONFROMWKB""ST_GEOMETRYFROMTEXT""ST_GEOMETRYFROMWKB""ST_GEOMETRYN""ST_GEOMETRYTYPE""ST_GEOMFROMGEOJSON""ST_GEOMFROMTEXT""ST_GEOMFROMWKB""ST_EQUALS""ST_INTERIORRINGN""ST_INTERSECTS""ST_INTERSECTION""ST_ISCLOSED""ST_ISEMPTY""ST_ISRING""ST_ISSIMPLE""ST_LENGTH""ST_LINEFROMTEXT""ST_LINEFROMWKB""ST_LINESTRINGFROMTEXT""ST_LINESTRINGFROMWKB""ST_MLINEFROMTEXT""ST_MLINEFROMWKB""ST_MPOINTFROMTEXT""ST_MPOINTFROMWKB""ST_MPOLYFROMTEXT""ST_MPOLYFROMWKB""ST_MULTILINESTRINGFROMTEXT""ST_MULTILINESTRINGFROMWKB""ST_MULTIPOINTFROMTEXT""ST_MULTIPOINTFROMWKB""ST_MULTIPOLYGONFROMTEXT""ST_MULTIPOLYGONFROMWKB""ST_NUMGEOMETRIES""ST_NUMINTERIORRINGS""ST_NUMPOINTS""ST_OVERLAPS""ST_POINTFROMTEXT""ST_POINTFROMWKB""ST_POINTN""ST_POINTONSURFACE""ST_POLYFROMTEXT""ST_POLYFROMWKB""ST_POLYGONFROMTEXT""ST_POLYGONFROMWKB""ST_RELATE""ST_SRID""ST_STARTPOINT""ST_SYMDIFFERENCE""ST_TOUCHES""ST_UNION""ST_WITHIN""ST_X""ST_Y""ST_DISTANCE_SPHERE""SUBSTRING_INDEX""SUBTIME""TAN""TIMEDIFF""TIME_FORMAT""TIME_TO_SEC""TOUCHES""TO_BASE64""TO_DAYS""TO_SECONDS""UCASE""UNCOMPRESS""UNCOMPRESSED_LENGTH""UNHEX""UNIX_TIMESTAMP""UPDATEXML""UPPER""UUID""UUID_SHORT""VERSION""WEEKDAY""WEEKOFYEAR""WITHIN""X""Y""YEARWEEK"
|
|
|
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue