我可以在 MySQL 中调整哪些配置参数来提高其性能而无需进行任何代码更改?

我可以在 MySQL 中调整哪些配置参数来提高其性能而无需进行任何代码更改?

我正在管理一个 MySQL 服务器以进行测试,我想知道是否可以利用机器上可用的 4GB RAM 来提高 MySQL 的性能,而无需进行任何代码更改。

答案1

使用MySQLTuner(高性能MySQL优化脚本)。

# wget http://mysqltuner.pl/mysqltuner.pl
--2011-01-31 06:49:46--  http://mysqltuner.pl/mysqltuner.pl
Resolving mysqltuner.pl... 174.143.142.58
Connecting to mysqltuner.pl|174.143.142.58|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 39054 (38K) [text/plain]
Saving to: `mysqltuner.pl'

100%[==============================================================================================================================>] 39,054      54.6K/s   in 0.7s    

2011-01-31 06:49:49 (54.6 KB/s) - `mysqltuner.pl' saved [39054/39054]

# perl mysqltuner.pl

 >>  MySQLTuner 1.0.1 - Major Hayden <[email protected]>
 >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
 >>  Run with '--help' for additional options and output filtering
Please enter your MySQL administrative login: root
Please enter your MySQL administrative password: 

答案2

wget mysqltuner.pl并使用 运行它perl mysqltuner.pl。它由 Major Hayden 编写,用于建议数据库优化。

相关内容