MySQL installation and configuration tutorial on Mac
This example shares the MySQL installation tutorial on Mac for your reference. The details are as follows:
Download
MySQL Community Server: https://dev.mysql.com/downloads/mysql/
Go to the MySQL download interface (https://dev.mysql.com/downloads/mysql/), if you are using Mac OS access, then it will be selected for you by default Mac OS X platform, the following lists the MySQL versions that can be used on Mac OS. If you are using another Platform, Select the "Select Platform" option from the drop-down list.
There are many MySQL versions on Mac OS, including platform-based, such as 10.5/second and. dmg. Here I choose. dmg. Click download on the right to download.
Next, you will be redirected to another interface, which prompts you to register it. You can directly select "No thanks, just take me to downloads!" at the bottom !", Then, the download page is displayed. This page lists many servers for download. You can select a server to download.
Double-click the pkg file and install it all the way down. Remember to save the password in the last pop-up box (it is your mysql root Account Password)
MYSQL2.png is successfully installed normally.
In this case, the installation is successful, but additional configuration is required:
(1) Go to system preference settings
(2) Click mysql
(3) Enable the mysql Service
Enter the mysql-u root-p command in the command line to prompt that no commod not found exists. We also need to add mysql to the system environment variable.
(1). Enter/Usr/local/mysql/bin,Check whether mysql exists in this directory. For details, see pic6.
(2) execute vim ~ /. Bash_profile
Add the mysql/bin directory to this file. For details, see pic7:
PATH = $ PATH:/usr/local/mysql/bin
After adding the file, Press esc and enter wq to save the file.
Finally, enter source ~ in the command line ~ /. Bash_profile
Now you can log on to mysql through mysql-u root-p, and you will be asked to enter the password, that is,> fj on pic3...
After successful logon, you can use the following command to change the password
Set password for 'root' @ 'localhost' = PASSWORD ('mysql123456 ');
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.