MySQL is a type of database software used to create, edit, query, and manage SQL data.
Follow the installation instructions below. We're going to installing two programs: MySQL Community Server and MySQL Workbench.
Start by downloading the MySQL Community Server .dmg
file from the MySQL Community Server page. Click the download icon. Use the No thanks, just start my download link.
Next, follow along with the Installer until you reach the Configuration page. Once you've reached Configuration, select or set the following options (use default if not specified):
epicodus
. You can use your own password if you want but epicodus
will be assumed in the lessons.echo 'export PATH="/usr/local/mysql/bin:$PATH"' >> ~/.bash_profile
. This will save this path in .bash_profile
, which is where our terminal is configured.source ~/.bash_profile
(or restart the terminal) in order to actually verify that MySQL was installed.Next, verify MySQL installation by opening terminal and entering the command mysql -uroot -pepicodus
. You'll know it's working and connected if you gain access and see the MySQL command line. If it's not working, you'll likely get a -bash: mysql: command not found
error.
You can exit the mysql program by entering exit
.
Next, download the MySQL Workbench .dmg
file from the MySQL Workbench page. (Use the No thanks, just start my download link.)
Install MySQL Workbench to Applications folder.
Then open MySQL Workbench and select the Local instance 3306
server. You will need to enter the password you set. (We used epicodus
.) If it connects, you're all set.
Start by downloading the MySQL Web Installer from the MySQL Downloads page.
Follow along with the installer:
epicodus
. You can use your own if you want but epicodus
will be assumed in the lessons.Next, add the MySQL environment variable to the System PATH. We must include MySQL in the System Environment Path Variable. This is its own multi-step process:
Next, verify installation by opening Windows PowerShell and entering the command mysql -uroot -pepicodus. You'll know it's working and connected if you gain access and see MySQL's command line. You can exit the mysql program by entering exit.
Finally, open MySQL Workbench and select the Local instance 3306 server (it may have a different name). You will need to enter the password you set (We used epicodus). If it connects, you're all set.
Lesson 4 of 5
Last updated February 23, 2021