Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Mysql5.7.20 installation and configuration method graphic text tutorial (mac)

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Mysql5.7.20 installation and configuration method graphic tutorials for you to share

1. Official website: https://dev.mysql.com/downloads/mysql/ download

It is strongly recommended to download the dmg file. After downloading the tar version and decompressing it, you need to move the folder to the default installation location / usr/local. It is really troublesome to need various configurations.

two。 Double-click the pkg file to install and continue until the following interface pops up:

The red box in the picture is the initial password after mysql installation. Please remember it.

3. Open the system preferences and click the mysql icon below

Go to the mysql console, where you can turn mysql server on or off

4. Environment settin

Open the terminal, enter the MySQL installation directory / usr/local/mysql, enter the bin directory, execute the mysql-u root-p login statement, the system prompts "- bash:mysql:command not found" error, because the system will take the initiative to find the command under the environment variable $PATH when executing the command, if the command is not found, the prompt does not exist, because we did not configure MySQL after installing MySQL, so the system can not find the mysql command.

Edit the file and add the MYSQL_PATH environment variable to vim ~ / .bash_profile:

# mysqlexport PATH=$ {PATH}: / usr/local/mysql/bin

Enter source ~ / .bash_profile for the file to take effect immediately.

5. Reset password

Access to the bin file, terminal

Enter the new password of mysqladmin-u root password

The password here is the password automatically generated by the system that was memorized before.

Then use mysql-u root-p to log in to mysql.

6. Alias

In order to improve productivity, it is obviously troublesome to type mysql in the bin file every time, so we need to define aliases so that no matter where you are, you can call the mysql and mysqkadmin commands directly. Terminal input:

Alias mysql=/usr/local/mysql/bin/mysqlalias mysqladmin=/usr/local/mysql/bin/mysqladmin

Wonderful topic sharing:

Installation tutorials for different versions of mysql

Installation tutorials for each version of mysql5.6

Installation tutorials for each version of mysql5.7

Installation tutorials for each version of mysql8.0

The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report