What defaults would you like to see changed in MySQL 5.7?

In MySQL 5.6, one of the most well received changes was improving the default configuration to be safer, and easier to use.

We are seeking community feedback for improvements that can be made to the default configuration in MySQL 5.7. Please leave a comment, or get in touch with me via email.

For elimination of confusion, please state both the setting you would like changed, and the new desired value.

Thanks!

Published by

morgo

I joined MySQL AB in 2006, left, and am now back at Oracle working on the MySQL team. I’ve also worked at Percona and InPowered.

  • miguelangelnieto

    As we already discussed, slave_net_timeout should be 60. And I think that heartbeat should be enabled by default too.

    • Thank you!

      Just one question: Do you have a suggested value for MASTER_HEARTBEAT_PERIOD?

      • miguelangelnieto

        That’s a difficult one. One second should be good enough. I think that’s like 7kB of data per minute. But we should also take in account slow networks.

  • Justin Swanhart

    I personally think innodb_log_file_size should be increased further. It is still too small.

    • Any suggestions for a new value?

      I can see that if it gets too large, developers with small SSDs may complain.. but 48MB x2 should still be considered quite reasonable.

      • Justin Swanhart

        I personally think 128M is a good default, even for SSD, .25 GB is not so bad.

        • Sounds good 🙂 With innodb-buffer-pool-size resizable online in 5.7, having a larger log file makes sense too.

  • Some ideas:

    For clients:

    Make it possible to use SSL w/o less configuration (if servercert is signed by public CA)
    ssl-ca=/etc/ssl/certs/ca-certificates.crt
    Make the prompt more useful (show the database name)
    prompt=”u@h [d] > ”

    We all know STATEMENT is not really safe:

    binlog_format=ROW (or MIXED? at least not STATEMENT)

    This makes it easier to troubleshoot replication:
    binlog_rows_query_log_events=ON

    The whole internet is UTF-8.. (alternative utf8mb4..)
    character_set_server=utf8

    Do a dump/restore of the bufferpool:
    innodb_buffer_pool_dump_at_shutdown=ON
    innodb_buffer_pool_load_at_startup=ON

    To use compression and the dynamic row format:
    innodb_file_format=Barracuda

    Be strict by default:
    innodb_strict_mode=ON

    Some steps to allow crash safe replication by default:
    master_info_repository=TABLE
    master_verify_checksum=ON
    relay_log_info_repository=ON
    relay_log_recovery=ON

    Don’t eat the whole disk by default:

    expire_logs_days=10

    For security: make it harder to create users by trying to grant privileges to nonexistend users.

    sql_mode += ‘NO_AUTO_CREATE_USER’

    Also disable symlinks and local infile by default (a secure by default installation)

    I think many of the defaults have already changed to be more secure by default 🙂

  • A good test would be to create a 5.6 or 5.7 instance with default settings and then monitor it with MySQL Enterprise Monitor and see which advisor rules fire

  • fakename

    –skip-name-resolve by default

  • Daniel Black

    report_host={hostname}

    expire_logs_days=30 (something not 0 and not < 14)

    innodb_buffer_pool_load_at_startup/innodb_buffer_pool_dump_at_shutdown=ON

    min-examined-row-limit=1000

    myisam-recover-options=QUICK,BACKUP

  • Greg Lane

    I know it’s not really a default change but why can’t the mysqld_safe file be edited to contain the interleave fix that Jeremy Cole has suggested?

  • Quick suggestion: query_cache_size = 0

    I don’t understand why 5.6 changed to default query_cache_size=1M at the same time as query_cache_type=OFF.

  • Shlomi Noach

    max_allowed_packet=64M
    group_concat_max_len=1M
    wait_timeout=600