Go to system preferences and click on the MySQL
server icon
Click Start Server
and enter the password for you mac, NOT
the mySql password creted at the end of install in previous lesson
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
Open the terminal and type in
mysql
The computer doesn't know the path
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
If we run the mysql command again, we will recieve this error message, which means it's working
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
It should be working now and look like this
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