{"id":1972,"date":"2020-05-10T13:47:07","date_gmt":"2020-05-10T13:47:07","guid":{"rendered":"https:\/\/www.ispmalaga.es\/es\/?p=1972"},"modified":"2020-05-10T14:06:53","modified_gmt":"2020-05-10T14:06:53","slug":"optimizar-mysql","status":"publish","type":"post","link":"https:\/\/www.ispmalaga.es\/en\/optimizar-mysql\/","title":{"rendered":"Optimizar Mysql"},"content":{"rendered":"\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t

Optimizar Mysql<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t

MySQLTuner<\/a> este escript accede a tu instalaci\u00f3n de mysql, chequea la misma y te ofrece sugerencias para incrimentar y optimizar el rendimiento de tu servidor mysql asegurando su estabilidad.<\/p>

  1. Baja el script MySQLTuner :<\/p>

    \u00a0<\/div>
    wget https:\/\/raw.githubusercontent.com\/major\/MySQLTuner-perl\/master\/mysqltuner.pl\n<\/code><\/pre><\/li>
  2. Cambia el permiso del script para ser ejecutable:<\/p>

    \u00a0<\/div>
    chmod +x mysqltuner.pl\n<\/code><\/pre><\/li>
  3. Ejecuta mysqltuner.pl<\/code> . Veras que te pide acceso administrativo tendras que poner la pass de administrador:<\/p>

    \u00a0<\/div>
    .\/mysqltuner.pl\n<\/code><\/pre><\/li>
  4. El script te va a mostrar algo como esto o similar:<\/p>

    \u00a0<\/div>
    \n         >>  MySQLTuner 1.4.0 - Major Hayden \n         >>  Bug reports, feature requests, and downloads at http:\/\/mysqltuner.com\/\n         >>  Run with '--help' for additional options and output filtering\n        Please enter your MySQL administrative login: root\n        Please enter your MySQL administrative password:\n        [OK] Currently running supported MySQL version 5.5.41-0+wheezy1\n        [OK] Operating on 64-bit architecture\n\n        -------- Storage Engine Statistics -------------------------------------------\n        [--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MRG_MYISAM\n        [--] Data in InnoDB tables: 1M (Tables: 11)\n        [--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17)\n        [!!] Total fragmented tables: 11\n\n        -------- Security Recommendations  -------------------------------------------\n        [OK] All database users have passwords assigned\n\n        -------- Performance Metrics -------------------------------------------------\n        [--] Up for: 47s (113 q [2.404 qps], 42 conn, TX: 19K, RX: 7K)\n        [--] Reads \/ Writes: 100% \/ 0%\n        [--] Total buffers: 192.0M global + 2.7M per thread (151 max threads)\n        [OK] Maximum possible memory usage: 597.8M (60% of installed RAM)\n        [OK] Slow queries: 0% (0\/113)\n        [OK] Highest usage of available connections: 0% (1\/151)\n        [OK] Key buffer size \/ total MyISAM indexes: 16.0M\/99.0K\n        [!!] Query cache efficiency: 0.0% (0 cached \/ 71 selects)\n        [OK] Query cache prunes per day: 0\n        [OK] Temporary tables created on disk: 25% (54 on disk \/ 213 total)\n        [OK] Thread cache hit rate: 97% (1 created \/ 42 connections)\n        [OK] Table cache hit rate: 24% (52 open \/ 215 opened)\n        [OK] Open file limit used: 4% (48\/1K)\n        [OK] Table locks acquired immediately: 100% (62 immediate \/ 62 locks)\n        [OK] InnoDB buffer pool \/ data size: 128.0M\/1.2M\n        [OK] InnoDB log waits: 0\n        -------- Recommendations -----------------------------------------------------\n        General recommendations:\n            Run OPTIMIZE TABLE to defragment tables for better performance\n            Enable the slow query log to troubleshoot bad queries\n        Variables to adjust:\n            query_cache_limit (> 1M, or use smaller result sets)\n      <\/code><\/pre>

    MySQLTuner ofrece sugerencias sobre c\u00f3mo mejorar el rendimiento de la base de datos. Si desconf\u00eda de actualizar su base de datos por su cuenta, seguir las sugerencias de MySQLTuner es una de las formas m\u00e1s seguras de mejorar el rendimiento de su base de datos.<\/p><\/li><\/ol>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t
    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t\t\t\t
    \n\t\t\t\t

    Tuneando MySQL<\/h2>\n

    Antes de cambiar la configuraci\u00f3n de MySQL, este avisar\u00e1 de los cambios y c\u00f3mo afectan su base de datos. Incluso cuando se siguen las instrucciones de programas como MySQLTuner, es mejor tener cierta comprensi\u00f3n del proceso.<\/p>\n

    El archivo de configuraci\u00f3n de MySQL est\u00e1 en la siguiente ubicaci\u00f3n: \/etc\/mysql\/my.cnf<\/code>.<\/p>\n

    \n

    Nota<\/strong><\/p>\n

    \n

    Antes de nada cree un backup de su archivo my.cnf<\/code> file:<\/p>\n

     <\/div>\n
    cp \/etc\/mysql\/my.cnf ~\/my.cnf.backup\n<\/code><\/pre>\n

    Sugiero que realice peque\u00f1os cambios, uno a la vez, y luego supervise el servidor despu\u00e9s de cada cambio. Debe reiniciar MySQL despu\u00e9s de cada cambio:<\/p>\n

    Para distribuciones que usan systemd:<\/p>\n

     <\/div>\n
    systemctl restart mysqld\n<\/code><\/pre>\n

    Para distribuciones con diferente init systems:<\/p>\n

     <\/div>\n
    service mysql restart\n<\/code><\/pre>\n

    Al cambiar los valores en el archivo my.cnf, aseg\u00farese de que la l\u00ednea que est\u00e1 cambiando no haya sido comentada con el prefijo de comentario (#).<\/p>\n<\/div>\n<\/blockquote>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"

    Optimizar Mysql MySQLTuner este escript accede a tu instalaci\u00f3n de mysql, chequea la misma y te ofrece sugerencias para incrimentar y optimizar el rendimiento de tu servidor mysql asegurando su estabilidad. Baja el script MySQLTuner : \u00a0 wget https:\/\/raw.githubusercontent.com\/major\/MySQLTuner-perl\/master\/mysqltuner.pl Cambia el permiso del script para ser ejecutable: \u00a0 chmod +x mysqltuner.pl Ejecuta mysqltuner.pl . Veras… Read More »Optimizar Mysql<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","footnotes":""},"categories":[315],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.ispmalaga.es\/en\/wp-json\/wp\/v2\/posts\/1972"}],"collection":[{"href":"https:\/\/www.ispmalaga.es\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ispmalaga.es\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ispmalaga.es\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ispmalaga.es\/en\/wp-json\/wp\/v2\/comments?post=1972"}],"version-history":[{"count":5,"href":"https:\/\/www.ispmalaga.es\/en\/wp-json\/wp\/v2\/posts\/1972\/revisions"}],"predecessor-version":[{"id":1977,"href":"https:\/\/www.ispmalaga.es\/en\/wp-json\/wp\/v2\/posts\/1972\/revisions\/1977"}],"wp:attachment":[{"href":"https:\/\/www.ispmalaga.es\/en\/wp-json\/wp\/v2\/media?parent=1972"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ispmalaga.es\/en\/wp-json\/wp\/v2\/categories?post=1972"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ispmalaga.es\/en\/wp-json\/wp\/v2\/tags?post=1972"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}