Configure MySQL database on Mac
Posted on July 22, 2015
In the root directory, open the .bash_profile
to add the MySQL path in it.
Add the codes below to set the default address of your MySQL, and restart the terminal:
export PATH=$PATH:/usr/local/mysql/bin
Then, MySQL can be easily opened in the terminal just using the code: mysql -u root -p
.
###Basic MySQL commands:
Create New Users
Delete Users
When we want to delete a user created before, we first need to login MySQL using administrator account.
The code to delete specific user or database is shown below:
###Change User’s Password