Method of installing MySQL8.0 under MacOS and logging in to MySQL
- 2021-11-30 01:47:50
- OfStack
According to the official tutorial, download the installation package. After clicking Install, if you need to start at the command line, you need to set the command path:
From the command line, open the configuration file
.bash_profile:
vim ~/.bash_profile
Add in the last line:
PATH=$PATH:/usr/local/mysql/bin
Press esc and enter wq to save and exit.
On the command line, enter:
source ~/.bash_profile
You can then use the
mysql -u root -p
Connected to MySQL database
Summarize