The MySQL download can be found here.
- Download the Mac OS X 10.10 (x86, 64-bit), DMG Archive.
- When download is complete, open the installation packages by double-clicking the package icon. There will be a pop-up window that provides a temporary password for MySQL’s “root” user. This password will be a slew of random characters that is crucial to getting MySQL up and running smoothly. Be certain to take note of this password!
- Start your MySQL server instance from your computer’s System Preferences. To do so, click the Apple icon in the upper right hand corner of your desktop screen. Select System Preferences.
In System Preferences, locate and double-click the MySQL icon.
Press the “Start MySQL Server” button.
You may be asked to enter a username and password in order to make this change. This will be your normal desktop username and password. For example, if you are on a Bowdoin computer, this will be your Bowdoin username and password. - From here, you will need to reset your MySQL root user password, which will require working from your computer’s Terminal with root user privileges. To open up a Terminal window, open up Mac’s Finder.
Locate the Applications folder, from there locate the Utilities folder, and the Terminal should be there. Double-click the Terminal to open a window. - In the Terminal, type the command: /usr/local/mysql/bin/mysql -u root -p
- Enter your temporary password and press Enter. Note that the key icon will not move as you type in your password. This is normal!
- From here, you are connected to the MySQL server from the root! Now it’s time to change your password to something a bit more memorable (and less nonsensical). Type the command: SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(‘typeyourpasswordhere’); Be sure to type the command yourself. Copying and pasting may cause a problematic difference in formatting. It’s also worth noting the use of the semicolon here. In SQL, like many other programming languages, the semicolon indicates the end of a statement, much like a period indicates the end of a sentence.
That’s all there is to it. If you’ve made it this far without a glitch, congratulations! You’ve successfully download MySQL, started the server, and have access via the root user with a newly created password.