Skip to content
alex [dot] kramer [at] g_m_a_i_l [dot] com edited this page Oct 9, 2018 · 9 revisions

Install (OSX)

brew update
brew install mysql

Start/stop as launchd-managed daemon (OSX)

brew services start mysql
brew services stop mysql
brew services restart mysql

Start/Stop as process

mysql.service start
mysql.service stop

Check status

mysqladmin -u root -p status

Or if you are managing services with Homebrew:

brew services list

Process metrics

SHOW FULL PROCESSLIST;
SHOW ENGINE INNODB STATUS[\G];

To enable full status logging to file (innodb_status.<PID> in MySQL data dir), update /etc/my.cnf with this line:

innodb-status-file=1

Change password

SET PASSWORD FOR 'user'@'localhost' = PASSWORD('MyNewPass');

Change port (or other default config)

Create file /etc/my.cnf:

[client]
port = 3307
[mysqld]
port = 3307
bind-address = 127.0.0.1
[mysqld_safe]
[mysqldump]
[mysql]
[isamchk]
Clone this wiki locally