Skip to content

Instantly share code, notes, and snippets.

@caius
Created February 28, 2020 13:08
Show Gist options
  • Save caius/8a6b33b456a1574ee20f4d0a7698a4ed to your computer and use it in GitHub Desktop.
Save caius/8a6b33b456a1574ee20f4d0a7698a4ed to your computer and use it in GitHub Desktop.
# To configure [email protected] on macOS under homebrew.
# Stick in /usr/local/etc/my.cnf.d/override.cnf
[mysqld]
# Only allow connections from localhost
bind-address = 127.0.0.1
innodb_file_per_table = ON
innodb_flush_method=O_DIRECT
innodb_log_file_size=50M
innodb_buffer_pool_size=256M
innodb_flush_log_at_trx_commit = 0
innodb_thread_concurrency = 17
skip-log-bin
query_cache_size=512M
query_cache_type=1
thread_cache_size=4
back_log=75
myisam_sort_buffer_size=64M
join_buffer_size=64M
read_buffer_size=64M
sort_buffer_size=64M
thread_cache_size=384
wait_timeout=7200
connect_timeout=10
tmp_table_size=256M
max_heap_table_size=256M
max_allowed_packet=256M
max_connect_errors=1000
read_rnd_buffer_size=256M
bulk_insert_buffer_size=64M
query_prealloc_size=128M
query_alloc_block_size=131072
@caius
Copy link
Author

caius commented Feb 28, 2020

You'll need to stop the server, remove /usr/local/var/mysql/{ib_logfile,ibdata}? and start again.

I usually just trash everything in the server first in terms of databases. You could dump & load them if you need the data.

@caius
Copy link
Author

caius commented Feb 28, 2020

Make sure you don't have a /etc/my.cnf or ~/.my.cnf too, else they'll take priority

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment