Created
August 2, 2022 15:52
-
-
Save danigunawan/e710062a1a4f233a5ca636d576c3461e to your computer and use it in GitHub Desktop.
MySQL Tunner On Docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # MySQLTuner: https://github.com/major/MySQLTuner-perl | |
| # Open Bash with the container. | |
| docker exec [mariadb_or_mysql] bash | |
| # Change the working directory to `/tmp`. | |
| cd /tmp | |
| # Install wget. | |
| apt-get update | |
| apt-get install -y wget | |
| # Download mysqltuner. | |
| 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/vulnerabilities.csv -O vulnerabilities.csv | |
| # Run MySQLTuner. | |
| chmod u+x mysqltuner.pl | |
| ./mysqltuner.pl --user $MYSQL_USER --pass $MYSQL_PASSWORD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment