MySQL 5.7.13 installation and configuration method graphic tutorial on Mac

MySQL 5.7.13 installation and configuration method graphic tutorial on Mac

MySQL 5.7.13 installation tutorial for Mac, very detailed, recorded as follows

First, download the installation package. If you are not afraid of trouble, you can directly download it from Baidu mysql

This is to use the command line installation, which may cause various problems in the middle. Another way is to go directly to the official website to download the DMG format installation package (Ps: It is best to use Thunder to download directly, so that the download will not be very slow due to network speed problems. It only took me two minutes to download at a normal speed)

1. The installation package downloaded from the official website: just open it and click the next step. After the installation is complete

Remember password. This will be used when changing password.

Open the system preferences and you will find a mysql icon at the bottom.

This is the installation successfully. Click it and click start Mysql to start. If there is no response, just restart it directly. You don’t have to toss it. You will find that after tossing for a long time, it can be done by restarting. After restarting, you will find that your Mysql automatically starts serving.

At this time, if you execute it directly in the command line, you will definitely be prompted

$ mysql
 -bash: mysql: command not found

At this time we need to add mysql to the environment variables:

Execute vim ~/.bash_profile
  Add the mysql/bin directory to the file, see pic7:
  PATH=$PATH:/usr/local/mysql/bin  
After adding, press esc and enter wq to save the changes.
Finally, enter source ~/.bash_profile in the command line
The path above is the mysql folder under /usr/local/. It may be the same as the downloaded name. Go in and have a look.

Ps: To enter the editing mode in vim, press i

Then your mysql is installed.

2. Install using the command line downloaded from Baidu

First, unzip the package you downloaded. It should be like this

Rename the first one to mysql (just for ease of viewing) and move it to /usr/local/

Enter the /bin/ folder in the console

mysqld --initialize --user='your username'

Then wait for a while and the installation will be completed. Finally, you will be given a password. Remember to use it to change the password later.

Install the previous steps to configure the environment variables

At this time, if you open mysql in the command line, you will find that it will prompt an error. Don't worry about it. It's a waste of time. Just restart it.

Then your mysql can be used

3. Change the root user password

The initial password is long and boring, so you must change it to what you want.

prodeMacBook-Pro:local pro$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 86
Server version: 5.7.17 MySQL Community Server (GPL)
mysql> SET PASSWORD = PASSWORD('123456');
Query OK, 0 rows affected (0.03 sec)

Done, done. The official provides a graphical management interface. You can download the workbench from the official website. It is very fast using Thunder.

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Mysql WorkBench installation and configuration graphic tutorial
  • MySQL 5.7.17 and workbench installation and configuration graphic tutorial
  • mysql workbench installation and configuration tutorial under centOS
  • MySQL and MySQL Workbench Installation Tutorial under Ubuntu
  • Solution to the error "libpng12-0 package not installed" when installing mysql workbench in Ubuntu 16.10
  • MYSQL ZIP installation-free version configuration steps and graphical management tool mysql-workbench
  • MySQL 5.7.12 installation and configuration tutorial under Mac OS 10.11
  • mysql5.7.20 installation and configuration method graphic tutorial (mac)
  • MySQL 5.7.17 installation and configuration tutorial for Mac
  • MySQL5.7+ MySQL Workbench installation and configuration method graphic tutorial under MAC

<<:  A complete list of common Linux system commands for beginners

>>:  How to encapsulate the table component of Vue Element

Recommend

Use shell script to install python3.8 environment in CentOS7 (recommended)

One-click execution To install Python 3.8 in a vi...

Docker Tutorial: Using Containers (Simple Example)

If you’re new to Docker, take a look at some of t...

Linux swap partition (detailed explanation)

Table of contents linux 1. What is SWAP 2. What d...

MySQL 8.0.18 adds users to the database and grants permissions

1. It is preferred to use the root user to log in...

Design Theory: Hierarchy in Design

<br />Original text: http://andymao.com/andy...

How to implement scheduled backup of MySQL in Linux

In actual projects, the database needs to be back...

How to deal with too many Docker logs causing the disk to fill up

I have a server with multiple docker containers d...

js to realize a simple advertising window

This article shares the specific code of js to im...

CSS and HTML and front-end technology layer diagram

Front-end technology layer (The picture is a bit e...

Front-end state management (Part 1)

Table of contents 1. What is front-end state mana...

Detailed explanation of the basic usage of the img image tag in HTML/XHTML

The image tag is used to display an image in a we...

MySQL DML statement summary

DML operations refer to operations on table recor...

Method and introduction of table index definition in MySQL

Overview An index is a table of correspondence be...