5.1 Install MariaDB with Brew:

brew install mariadb
mysql_install_db

After a successful installation, you can start the server:

mysql.server start

You should get some positive feedback on that action:

Starting MySQL
. SUCCESS!

5.2 Install MySQL with Brew

I am using the Homebrew MySQL server.

AfterMySQL installation:

To have launchd start mysql now and restart at login:

brew services start mysql

restart Homebrew mysql

brew services restart mysql

see: https://robots.thoughtbot.com/starting-and-stopping-background-services-with-homebrew

To See which brew services are running:

brew services list

Returns

Name    Status  User   Plist
mongodb stopped        
mysql   started user-name /Users/user-name/Library/LaunchAgents/homebrew.mxcl.mysql.plist
php56   started user-name /Users/user-name/Library/LaunchAgents/homebrew.mxcl.php56.plist

Or, if you don't want/need a background service you can just run:

mysql.server start

If you need to stop the server, you can use the simple command:

mysql.server stop

To login

mysql -u root -p

By default there is no my.cnf file in use by default, find it in the mysql folder in the Cellar if necessary.

t is advisable to change the MySQL server password and secure your installation. The simplest way to do this is to use the provided script:

/usr/local/bin/mysql_secure_installation

Just answer the questions and fill them in as is appropriate for your environment.

5.2.1 my.conf

By default MySQL reads the my.conf file from these locations:

Default options are read from the following files in the given order: /etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf The following groups are read: mysql client The following options may be given as the first argument: --print-defaults Print the program argument list and exit. --no-defaults Don't read default options from any option file. --defaults-file=# Only read default options from the given file #. --defaults-extra-file=# Read this file after the global files are read.

The homebrew MySQL installation contains sample configuration files in the installations's support-files folder.

ls $(brew --prefix mysql)/support-files/my-*

If you need to change the default settings you can copy one of these to a new location… a Homebrew install of MySQL will most likely be in /usr/local so the my.cnf file should not not be added to the system /etc folder, instead copy the file into /usr/local/etc.

cp $(brew --prefix mysql)/support-files/my-default.cnf /usr/local/etc/my.cnf

Add a bash alias to edit that file

# Manage MySQL configuration.
alias conf_mysql="sublime /usr/local/etc/my.cnf"

5.2.1.1 Multi-byte UTF-8 support in Drupal 7

For MySQL In order to be able to use this, the following requirements must be met:

In order to allow for large indexes, MySQL must be set up with the following my.cnf settings:

@ my.cnf (just append the file...)

[mysqld]
innodb_large_prefix=true
innodb_file_format=barracuda
innodb_file_per_table=true

Restart the MySQL service.

The PHP MySQL driver must support the utf8mb4 charset (libmysqlclient 5.5.3 and up, as well as mysqlnd 5.0.9 and up). The MySQL server must support the utf8mb4 charset (5.5.3 and up). Run the command mysql --version to see your current MySQL version.

Now you can edit my.conf

5.3 SequelPro

Download SequelPro and install it. (it's awesome and free!).

You should be able to automatically create a new connection via the Socket option without changing any settings.