จูน Mysql แบบนี้ถูกต้องไหมครับ

mysql รันใน vm ครับ แล้วแรมเหลือไม่พอ อย่างที่ผมบอก OS มันเห็นว่ามีแรมแค่ 3GB เอง เอามาใช้กับ mysqltmp ซะ 1GB ไปแล้วมันก็ไม่พอสิครับ

ถ้าทั้งเครื่องรันอยู่ vm เดียว ปรับแรมให้สุดเลยครับ ไม่ต้องสนใจ os ตัวด้านนอก ถ้าไม่ได้เอาไปทำงานอย่างอื่นอีก

*** MySQL’s maximum memory usage is dangerously high ***
*** Add RAM before increasing MySQL buffer variables ***

ทำยังไงก็ได้ (เพิ่มแรม,ลดค่าที่จูนใน mysql) ให้ไอ้นี่หายไปครับ

ไม่งั้นมี oom error ไม่ก็ที่แย่กว่านั่นเครื่องม่องไปเลย

ผมปรับแล้วให้สุดเจอแบบนี้อยู่ดี

>>  MySQLTuner 1.2.0 - Major Hayden <major@mhtx.net>
 >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
 >>  Run with '--help' for additional options and output filtering

-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.5.32-cll
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -------------------------------------------
[--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
ERROR 126 (HY000) at line 1: Incorrect key file for table '/var/mysqltmp/#sql_3aca_0.MYI'; try to repair it
ERROR 126 (HY000) at line 1: Incorrect key file for table '/var/mysqltmp/#sql_3aca_0.MYI'; try to repair it
[!!] InnoDB is enabled but isn't being used
Argument "" isn't numeric in numeric gt (>) at ./mysqltuner.pl line 564 (#1)
    (W numeric) The indicated string was fed as an argument to an operator
    that expected a numeric value instead.  If you're fortunate the message
    will identify which operator was so unfortunate.

[OK] Total fragmented tables:

-------- Security Recommendations  -------------------------------------------
[OK] All database users have passwords assigned
ERROR 126 (HY000) at line 1: Incorrect key file for table '/var/mysqltmp/#sql_3aca_0.MYI'; try to repair it
Argument "" isn't numeric in numeric eq (==) at ./mysqltuner.pl line 623 (#1)

-------- Performance Metrics -------------------------------------------------
[--] Up for: 14h 32m 29s (2M q [53.608 qps], 102K conn, TX: 6B, RX: 427M)
[--] Reads / Writes: 87% / 13%
[--] Total buffers: 2.4G global + 5.5M per thread (500 max threads)
[OK] Maximum possible memory usage: 5.1G (84% of installed RAM)
[OK] Slow queries: 0% (9/2M)
[OK] Highest usage of available connections: 2% (12/500)
[!!] Cannot calculate MyISAM index size - re-run script as root user
[OK] Query cache efficiency: 40.8% (900K cached / 2M selects)
[!!] Query cache prunes per day: 1524925
[OK] Sorts requiring temporary tables: 0% (126 temp sorts / 297K sorts)
[!!] Temporary tables created on disk: 45% (134K on disk / 294K total)
[OK] Thread cache hit rate: 99% (12 created / 102K connections)
[!!] Table cache hit rate: 0% (4K open / 672K opened)
[OK] Open file limit used: 25% (8K/32K)
[OK] Table locks acquired immediately: 99% (1M immediate / 1M locks)

-------- Recommendations -----------------------------------------------------
General recommendations:
    Add skip-innodb to MySQL configuration to disable InnoDB
    MySQL started within last 24 hours - recommendations may be inaccurate
    Enable the slow query log to troubleshoot bad queries
    Temporary table size is already large - reduce result set size
    Reduce your SELECT DISTINCT queries without LIMIT clauses
    Increase table_cache gradually to avoid file descriptor limits
Variables to adjust:
    query_cache_size (> 64M)
    table_cache (> 4096)

ถ้าเรื่องข้อมูล ไม่ต้องแปลงครับ ใช้ dump เอา ไม่ยากครับ