mysql性能优化工具mysqltuner使用
1、下载:wget --no-check-certificate https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl
2、chmod + x mysqltuner.pl
3、添加环境变量:
export LD_LIBRARY_PATH=/usr/local/mysql/lib
export PATH=/usr/local/mysql/bin:$PATH
4、开始测试:perl mysqltuner.pl --host localhost --port 3306 --user root --pass 123456 --forcemem 128 --socket /usr/local/mysql/mysql.sock
5、主要看最下面的信息,会给出参数调整。