

- HOW TO INSTALL MYSQL ON MAC OS HOW TO
- HOW TO INSTALL MYSQL ON MAC OS ARCHIVE
- HOW TO INSTALL MYSQL ON MAC OS PASSWORD
If you see a “command not found” error instead, something didn’t work out with the alias or PATH tweak. Try typing mysqladmin now and see what happens. bash_profile file will automatically be deleted for your convenience as soon as the PATH is updated. Open a new session and your PATH will now be amended with the MySQL location. Save and quit vi, then close the Terminal session. Now add the following line to it: export PATH="/usr/local/mysql/bin:$PATH"
HOW TO INSTALL MYSQL ON MAC OS HOW TO
Here’s how to tweak that PATH variable instead for a permanent solution:Ĭreate a new file in your home directory and call it. This will work fine until you quit Terminal and start a new session. Here’s how to setup an alias: alias mysql=/usr/local/mysql/bin/mysqlĪlias mysqladmin=/usr/local/mysql/bin/mysqladmin

Or better yet, add this location to the PATH variable. To make it easier we can add a temporary alias to our shell. It’s tedious having to type this out every time.

In this folder we’ll have to execute several commands, each a folder or so deep. In OS X (and many other *NIX type distributions), MySQL is installed at /usr/local/mysql. This step is optional but highly recommended should you wish to do any command line hacking that involves MySQL.

Adding easy command line access to MySQLīefore we can start using MySQL with fancy GUI tools, it’s probably wise to make it easily accessible from the command line as well.
HOW TO INSTALL MYSQL ON MAC OS PASSWORD
You’ll need to provide your password (for Administrator privileges and all). Should this happen, start the daemon via the command line manually, like this: // starting the daemon manually At times however, that fancy button is greyed out, which means that the Launch Daemon isn’t running. If you ever want to start/stop MySQL, this is the most convenient place to do it on your Mac. Tick the box that reads “automatically start MySQL server on startup” if you want that behaviour. Start MySQL using the preference pane I’ve just mentioned. Take a look under (Apple Logo) – System Preferences and see if you can find the MySQL Preference Pane. We’ll take care of that in the next step. When the installer has finished, MySQL is installed on your system – but of course it’s neither running nor configured yet.
HOW TO INSTALL MYSQL ON MAC OS ARCHIVE
You’ll probably want the DMG Archive equivalent to the version of OS X you’real running (this screenshot was taken in November 2015, things may have changed since then):ĭouble-click the file and you’ll be guided through a standard OS X installation. Pick a platform from the drop down menu (Mac OS X).Īgain there are several versions you can download. Hunt for something called the Community GPL Downloads, and for a section called MySQL Community Server. If that link isn’t working, head over to and find the Downloads section. You’ll find several packages at the MySQL website in the downloads section: These instructions will work on Yosemite and El Capitan (I’ve tested it on both systems – in fact that’s part of why I’m writing this, so that I can remember for next time). In this article I’ll focus on the latter, and I’ll also talk you through how to add MySQL to the PATH variable and how to secure MySQL to keep the evildoers away from your server. I recommend the dedicated installer because it’s the only package that will also add a convenient Preference Pane for starting and stopping the service.
