Directory
- Tools
- Installation
First, the tool
We need now two tools: MySQL server (mysql-5.7.18), MySQL GUI (mysql-workbench)
MySQL server contains the entire operating environment of MySQL, installed it can be done by the command line to let MySQL run very well.
Of course if you don't like the command line, you can download a GUI tool to manage MySQL. The GUI is rich in functionality, including permission settings, creating databases, creating tables, and so on.
Second, installation
1.MySQL Server
: https://dev.mysql.com/downloads/mysql/. I downloaded the mysql-5.7.18-macos10.12-x86_64.dmg .
Download the direct installation, no words.
It is important to note that: After the installation will prompt the pop-up window root account password, please write him down in the back we will use
After installation at the terminal does not recognize the MySQL command, need to configure
$ cd/usr/local/bin/sudoln -fs/usr/local/mysql/bin/--version #能显示 MySQL version description MySQL installation successful
To change the password of the root account:
sudo /usr/local/mysql/bin/mysqld_safe--skip-grant--u root# will enter MySQL command mode, enter the following command to update Mysql.user SET authentication_string=password ('* * * * *') WHERE user=' Root'-u root-p
2. Installing the GUI
: https://dev.mysql.com/downloads/workbench/. I downloaded the mysql-workbench-community-6.3.9-osx-x86_64.dmg.
Download and install, no words.
After installation, open, Workbench, the interface is as follows:
Click to enter
Root
localhost:3306
The first entry will prompt to change the password, then modify it well.
Enter Workbench
The installation is complete!
Mac install MySQL