How to install MySQL on mac

By | August 7, 2020

To install and start MySQL on a mac, run these commands:

brew install mysql
mysql.server start

Useful commands to start and log in.

mysql.server stop
mysql --version or mysql -V
brew info mysql
mysql -uroot //to log in. (No password needed).

Useful commands within MySQL:

show databases;
create database <NAME_HERE>
mysql -u username -p new_database < data-dump.sql
Category: OSX

Leave a Reply

Your email address will not be published. Required fields are marked *