Last active
December 20, 2022 03:47
-
-
Save gregawoods/b26751a623a56aa0a75d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>KeepAlive</key> | |
<true/> | |
<key>Label</key> | |
<string>homebrew.mxcl.mysql</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/opt/mysql/bin/mysqld_safe</string> | |
<string>--bind-address=127.0.0.1</string> | |
<string>--datadir=/usr/local/var/mysql</string> | |
<string>--innodb_file_format=Barracuda</string> | |
<string>--innodb_large_prefix=ON</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>WorkingDirectory</key> | |
<string>/usr/local/var/mysql</string> | |
</dict> | |
</plist> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActiveSupport.on_load(:active_record) do | |
ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter.class_eval do | |
def create_table(table_name, options = {}) #:nodoc: | |
super(table_name, options.reverse_merge(:options => 'ROW_FORMAT=DYNAMIC ENGINE=InnoDB')) | |
end | |
end | |
end |
Added sample launch deamon for users on OS X and using Homebrew.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In order to use this solution your Mysql server will need to be configured with the following two options:
Barracuda
ON
I credit serversforhackers.com for the info on
innodb_large_prefix
.