01-03 - install Mac - part 2

01

Go to system preferences and click on the MySQL server icon

02

Click Start Server and enter the password for you mac, NOT the mySql password creted at the end of install in previous lesson

02b

I ran into a problem the server kept starting and stopping. I found an answer here , stackoverflow

and ran the following commands to fix it

sudo /usr/local/mysql/support-files/mysql.server start
sudo /usr/local/mysql/support-files/mysql.server stop
sudo /usr/local/mysql/support-files/mysql.server restart

03

Open the terminal and type in

mysql
                

The computer doesn't know the path

04

Type in the path for my sql,

echo 'export PATH=/usr/local/mysql/bin:$PATH' >> ~/.zshrc

or type

echo 'export PATH=/usr/local/mysql/bin:$PATH' >> ~/.bash_profile

If using Bash, run .zshrc or .bash_profile after adding the command

. ~/.zshrc

05

If we run the mysql command again, we will recieve this error message, which means it's working

06

Type in the command

mysql -u root -p

THIS IS WHERE we type the password we created at the end of installation, seen at the end of the previous lesson, our pass word is

password

07

It should be working now and look like this

08

Create a database and name it, remember the name

create database db1;

You can run SQL command right here in the terminal but we will install and use popSql