Detailed steps for installing mysql5.7.18 on Mac, macmysql5.7.18
I. Tools
We need now two tools: MySQL Server (mysql-5.7.18), MySQL GUI (mysql-workbench)
The MySQL Server contains the entire MySQL running environment. After installing MySQL, you can run MySQL well through the command line.
If you do not like command line, you can download a GUI tool to manage MySQL. Rich GUI functions, including permission settings, database creation, and table creation.
Ii. Installation
1. MySQL Server
: Https://dev.mysql.com/downloads/mysql. I downloaded a mysql-5.7.18-macos10.12-x86_64.dmg.
Install the SDK directly after the download.
It is worth noting that after installation, a pop-up window will be prompted for the root account password. Please record it and we will use it later.
After installation, the mysql command cannot be identified on the terminal. You need to configure
$ cd /usr/local/bin/$ sudo ln -fs /usr/local/mysql/bin/mysql mysql$ mysql --version
# The mysql version is displayed, indicating that mysql is successfully installed.
Modify the password of the root account:
$ Sudo/usr/local/mysql/bin/mysqld_safe -- skip-grant-tables
$ Mysql-u root
# Enter the mysql command mode and enter the following command line by line
UPDATE mysql. user SET authentication_string = PASSWORD ('*****') WHERE User = 'root ';
Flush privileges;
\ Q
# Verify the password after modification
# Mysql-u root-p
2. Install GUI
: Https://dev.mysql.com/downloads/workbench. I downloaded a mysql-workbench-community-6.3.9-osx-x86_64.dmg.
Download and install.
Open Workbench after installation. The page is as follows:
Click to enter
Root
Localhost: 3306
The first entry will prompt you to change the password.
Go to Workbench
This installation is complete!
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.