Home > Database > Mysql Tutorial > Detailed steps to install mysql5.7.18 on Mac

Detailed steps to install mysql5.7.18 on Mac

巴扎黑
Release: 2017-05-21 11:42:47
Original
1645 people have browsed it

This article mainly introduces the detailed steps for installing mysql5.7.18 on Mac. It has certain reference value. Interested friends can refer to it

1. Tools

We need two tools now: MySQL server (mysql-5.7.18), MySQL GUI (mysql-workbench)

MySQL server contains the entire operation of MySQL Environment, after installing it, you can make MySQL run very well through the command line.

Of course, if you don’t like the command line, you can download a GUI tool to manage MySQL. The GUI has rich functions, including permission settings, creating databases, creating tables, etc.

2. Installation

  1.MySQL server

Download Address: https://dev.mysql.com/downloads/mysql/. What I downloaded is mysql-5.7.18-macos10.12-x86_64.dmg

. After downloading, I installed it directly. I was speechless all the way.

It is worth noting: After the installation is complete, a pop-up window will prompt the root account password. Please record it and we will use it later

Installation completed Finally, the mysql command cannot be recognized in the terminal. You need to configure it


$ cd /usr/local/bin/
$ sudo ln -fs /usr/local/mysql/bin/mysql mysql
$ mysql --version
Copy after login

# to display the mysql version description. mysql installation is successful

Change the password of the root account:

$ sudo /usr/local/mysql/bin/mysqld_safe --skip-grant-tables
$ mysql -u root
# will enter the mysql command mode , enter the following commands line by line

UPDATE mysql.user SET authentication_string=PASSWORD('*****') WHERE User='root';
FLUSH PRIVILEGES;
\q

#Verify password after modification

# mysql -u root -p

 2. Install GUI

Download address: https://dev.mysql.com/downloads/workbench/. What I downloaded is mysql-workbench-community-6.3.9-osx-x86_64.dmg

. After downloading and installing, I was speechless all the way.

After installation, open Workbench, the interface is as follows:

Click to enter

root

localhost:3306

When you enter for the first time, you will be prompted to change your password, so just change it.

Enter Workbench

The installation is now complete!

The above is the detailed content of Detailed steps to install mysql5.7.18 on Mac. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
mac
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template