MySQL 8.0.16 installation and configuration graphic tutorial under macOS

MySQL 8.0.16 installation and configuration graphic tutorial under macOS

This article shares the installation and configuration tutorial of MySQL 8.0.16 under macOS for your reference. The specific contents are as follows

1. Download the installer

Open MySQL official website

Select DOWNLOADS -> Community -> NySQL Community Server.

Scroll to the bottom of the page and select the operating system, here it is 8.0.16. The installation package is suitable for macOS 10.14 version and is compatible with both 32-bit and 64-bit.

Select the first one here to download the dmg file directly to your local computer.

A registration or login prompt will pop up immediately. Select Skip and download the installation package directly.

Save the installation package locally.

2. Use the installation program

Open the installation package to start the installation process.

Step 1.Introduction -> Continue.

Step 2. Permission -> Continue -> Agree

Step3. Installation Type -> Installation

Step4. Configuration -> Select the first strong password method -> next

Enter a password that must be at least 8 characters long. It is recommended that it be a mixture of numbers, letters, and special characters. -> Finish

Step5. Installation completed, close.

3. Service startup

Open System Preferences, find the "MySQL" icon at the bottom, and click to open it.

If it is displayed as shown below, "Stop MySQL Server", it means the service has been started. Otherwise, if it is "Start MySQL Server", it means the service is shut down and you need to click to start it manually.

Click Configuration to view related configurations.

4. Terminal startup

Open the Mac's built-in "Terminal".

The window content displays "[Computer Name]MacBook:~ [User Name]$"

Enter the code after the $ sign: "mysql –u root –p" (note that there is a space before each hyphen, for a total of three spaces) and press Enter.

Case 1: If "Enter password:" appears, enter the password set during installation above. Press Enter.

Case 2: If command not found appears, enter the code again after $ on a new line: "cd /usr/local/bin/" (note there is a space after cd) and press Enter.

A new line of content in the window displays "[Computer Name]MacBook:bin [User Name]$".

Type "sudo ln –fs /usr/local/mysql/bin/mysql/mysql" after the new $. (Note the difference between i and l, 4 spaces in total).

When "Password:" appears, enter the computer user password, which is the power-on password. After the Enter key is pressed successfully, enter the code again after the new $: "mysql –u root –p"

(Note that there is a space before each hyphen, a total of 3 spaces) and press Enter. Go to situation 1.

Case 3: After entering the code: "mysql –u root –p", it returns: -bash: mysql: command not found

1. Open the Mac terminal and enter: vim ~/.bash_profile

2. Then enter: i or press the insert button on the keyboard to enter the input state. There is an insert button at the bottom.

3. Then enter: PATH=$PATH:/usr/local/mysql/bin

4. Then press esc to exit the input state, and the insert display at the bottom will disappear

5. Finally, hold down the shift key and enter: (colon)---------Note: You must hold it down at the same time, otherwise you will not be able to enter wq later

6. Enter wq to save the input, and it will automatically exit to the terminal interface

7. Then enter: source ~/.bash_profile to make the environment variables effective

8. Close the terminal and reopen it. Transfer to situation 1

Eventually the "mysql>" cursor appears. See the figure below for details.

5. Test whether the installation is successful

Enter "SHOW DATABASES;" after "mysql>" (note the s and ; at the end). If the following is displayed, it means the installation is successful.

Wonderful topic sharing:

MySQL different versions installation tutorial

MySQL 5.7 installation tutorials for various versions

MySQL 5.6 installation tutorials for various versions

mysql8.0 installation tutorials for various versions

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 8.0.16 installation and configuration method graphic tutorial under Windows
  • mysql installer community 8.0.16.0 installation and configuration graphic tutorial
  • MySQL 8.0.16 installation and configuration tutorial under Windows 10
  • MySQL 8.0.16 compressed package installation and configuration method graphic tutorial
  • MySQL 8.0.16 winx64 installation and configuration method graphic tutorial
  • Steps for installing MySQL 8.0.16 on Windows and solutions to errors
  • MySQL 8.0.16 installation and configuration tutorial under CentOS7
  • MySql 8.0.16-win64 Installation Tutorial
  • Installation and configuration tutorial of MySQL 8.0.16 under Win10
  • mysql 8.0.16 winx64.zip installation and configuration method graphic tutorial

<<:  Several ways to implement 0ms delay timer in js

>>:  How to install suPHP for PHP5 on CentOS 7 (Peng Ge)

Recommend

Analysis of Apache's common virtual host configuration methods

1. Apache server installation and configuration y...

Website Color Schemes Choosing the Right Colors for Your Website

Does color influence website visitors? A few year...

WeChat applet implements SMS login in action

Table of contents 1. Interface effect preview 2.u...

Nginx configuration to achieve multiple server load balancing

Nginx load balancing server: IP: 192.168.0.4 (Ngi...

Detailed explanation on how to modify the default port of nginx

First find out where the configuration file is wh...

HTML CSS3 does not stretch the image display effect

1. Use the transform attribute to display the ima...

Mysql string interception and obtaining data in the specified string

Preface: I encountered a requirement to extract s...

Detailed explanation of Linux DMA interface knowledge points

1. Two types of DMA mapping 1.1. Consistent DMA m...

Understand the initial use of redux in react in one article

Redux is a data state management plug-in. When us...

How to show or hide common icons on the desktop in Windows Server 2012

Windows Server 2012 and Windows Server 2008 diffe...

HTML table tag tutorial (32): cell horizontal alignment attribute ALIGN

In the horizontal direction, you can set the cell...