Home >Database >Mysql Tutorial >MySql download MySQL5.7 and installation diagram under Mac system

MySql download MySQL5.7 and installation diagram under Mac system

小云云
小云云Original
2017-12-08 09:25:552819browse

This article mainly introduces the download of MySQL5.7 and detailed installation diagrams of MySql under Mac system. This article introduces it to you in great detail with pictures and texts. Friends who need it can refer to it. I hope it can help everyone.

1. Enter the following address in the browser

https://dev.mysql.com/downloads/mysql/

 

2. Enter the following interface: directly click on the location below and choose to skip login

Click here and download directly.

 

3. After the download is completed, directly Double-click to open, the following interface will pop up, then continue clicking

 

## Keep clicking to continue, just like installing other software

4. Start MySQL

After the installation is complete, go to the settings to view the following options. If there is MySQL in it, it means the installation has been successful

 

After clicking, Start MySQL

 

5. Change the database password

After the startup is completed, open the terminal

aliasmysql=/usr/local/mysql/bin /mysql

 aliasmysqladmin=/usr/local/mysql/bin/mysqladmin 

Copy the above two instructions to the terminal and run them, and give the two addresses a temporary alias

The purpose is that the next execution can directly execute mysql or mysqladmin

No need to switch directories back and forth

 

Next change the database password and execute the following command

Mysqladmin -u root -p password root123

Root123 is my new password, change it to the password you want to set

After pressing Enter, you will be prompted to enter the password. The password you enter at this time is not the password of your computer

but the password of the database

Before 5.7, there was a default username and password, both of which were root.

But From 5.7 onwards, there is only the default username P:root.

The default password will be automatically assigned to you during installation.

We can also use the mac notification bar Check it out

The picture below shows a database password automatically generated

 

The default password is localhost: and everything after it, after entering it, Enter.

 (Mac cannot see the password entered in the command line, so when entering the password, be careful not to make mistakes)

 

Six .Enter the database

See the above information, the modification is successful

Next enter the database

Make sure to execute: aliasmysql=/usr/local/mysql/bin/mysql

If it is not executed, you must switch to the above directory before executing the mysql command

Otherwise, it will prompt that mysql is not found

Next, execute the following command: mysql -u root - p

Note that there is nothing after -p, and then press Enter

You will be asked to enter your password. The password at this time is the password you modified above

I am The input here is: root123

See the following information, it all means that it has been entered into the database

Is everyone destroyed? Hurry up and get your hands dirty.

Related recommendations:


Mysql download and installation, deployment and graphical detailed operation tutorial_MySQL

MySQL download and installation, Configuration and use (win7x64)_Baidu experience

PHP development environment &MySQL download, installation and configuration process

The above is the detailed content of MySql download MySQL5.7 and installation diagram under Mac system. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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