Let’s say you have a website hosted on your computer, but no local MySQL database. You need a database. Where do you get one?
It turns out, just like you can host a website locally, you also can host a MySQL server locally.
How to do it?
It’s simple on a Mac. First, install brew. Then, using brew, install mysql. That’s it. Now you just need to start the server.
To start the server, open terminal and type
That gets your MySQL server up and running. To stop the server, in terminal, just type mysql.server stop.