In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article shares the installation and configuration tutorial of mysql 8.0.16 under macOS for your reference. The details are as follows
1. Download the installer
Open the MySQL official website
Select DOWNLOADS-> Community-> NySQL Community Server.
Drag to the bottom of the page and select the operating system, in this case 8.0.16. The installation package is available in macOS version 10.14 and is compatible with both 32-bit and 64-bit.
Select the first one here and download the dmg file directly to your local location.
Immediately after that, you will jump out of the registration or login prompt, choose to skip and download the installation package directly.
Save the installation package locally.
2. The installer uses
Open the installation package to enter the installation process.
Step1. Introduction-> continue.
Step2. License-> continue-> agree
Step3. Installation type-> installation
Step4. Configuration-> choose the first strong password method-> next
Enter a password that requires at least 8 characters. It is recommended that you mix numbers, letters, and special characters. -> Finish
Step5. Installation complete, close.
3. Service startup
Open the system preferences, find the "MySQL" icon at the lowest end, and click Open.
If the figure below is "Stop MySQL Server", it means that the service has been started. Otherwise, if it is "Start MySQL Server", it means that the service is off. You need to click to start it manually.
Click Configuration to view the relevant configuration.
4. Terminal startup
Open Mac's own "terminal".
The window reads "[computer name] MacBook:~ [user name] $"
Enter the code after the $sign: "mysql-u root-p" (note that there is a space before the dash, with a total of 3 spaces) and press enter.
Case 1: if "Enter password:" appears, enter the password you set during the installation above. Enter.
Case 2: if command not found appears, type the code again after the new line $: "cd / usr/local/bin/" (notice that there is a space after cd), and press enter.
The new line of the window reads "[computer name] MacBook:bin [user name] $".
Enter "sudo ln-fs / usr/local/mysql/bin/mysql/ mysql" after the new $. Notice the difference between I and l, with a total of 4 spaces.
When "Password:" appears, enter the computer user password, that is, the boot password. After the enter is successful, enter the code "mysql-u root-p" again after the new $
(note that there is a space before the short cross, with a total of 3 spaces) and press enter. Turn to situation 1.
Case 3: after entering the code "mysql-u root-p", return:-bash: mysql: command not found
1. Open the terminal of Mac and enter: vim ~ / .bash_profile
two。 Then enter: I or press the insert button of the keyboard to enter the input state, with an additional insert display at the bottom
3. Then enter: PATH=$PATH:/usr/local/mysql/bin
4. Then press esc to exit the input status, and the bottom inser display will disappear
5. Finally, hold down the shift key and type: (colon)-Note: be sure to press and hold it here at the same time, otherwise you can't type wq later.
6. Enter wq, save the input, and automatically exit to the terminal interface.
7. Then enter: source ~ / .bash_profile to make the environment variable effective
8. Close the terminal and reopen the terminal. Turn to situation 1
Finally the "mysql >" cursor appears. See the picture below for details.
5. Test whether the installation is successful
Enter "SHOW DATABASES;" after "mysql >" (note the end s and;), and the following indicates that the installation is successful.
Wonderful topic sharing:
Installation tutorials for different versions of mysql
Installation tutorials for each version of mysql5.7
Installation tutorials for each version of mysql5.6
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.