In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you mysql 8.0.11 macos10.13 installation and configuration method graphics and text tutorials, I believe that most people do not understand, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!
The details are as follows
Install mysql to download mysql. What I downloaded is: mysql-8.0.11-macos10.13-x86_64.dmg
Double-click to open mysql-8.0.11-macos10.13-x86_64.dmg, then double-click mysql-8.0.11-macos10.13-x86_64.pkg
Click all the way to continue, stupid installation, there is nothing to say
Select "Use Legacy Password Encryption" here, otherwise an error that authentication cannot be loaded will be reported when you connect to mysql using navicat.
Set a password for the "root" user
Installation completed
After the installation is successful, use the mysql command to report the error of command not found because the environment variable has not been configured yet.
Configure environment variables
First of all, you need to know what kind of Shell you use Mac OS X.
Open the terminal and enter: echo $SHELL enter to execute
If the output is csh or tcsh, then you are using C Shell.
If the output is: bash,sh,zsh, then you may be using a variant of Bourne Shell.
Before Mac OS X 10.2, the default was C Shell.
After Mac OS X 10.3, the default is Bourne Shell.
Mine is bash:
Enter: cd / usr/local/mysql, enter and execute
Then enter: sudo vim .bash _ profile, and enter to execute.
The root user password is required. Sudo uses root users to modify the environment variable file.
After entering the editor, we first press "I" to switch to the "insert" state. You can edit the content by moving the cursor up and down, or spaces, backspace and enter, which is the same as WINDOWS.
At the bottom of the document, enter: export PATH=$ {PATH}: / usr/local/mysql/bin
Then press Esc to exit the insert state, and enter: wq save exit at the bottom (or press shift+zz directly, or switch to uppercase mode and press ZZ, you can save the exit).
Enter: source .bash _ profile to enter and run the environment variable.
Enter the mysql command again, and you can use it.
If you can't connect to mysql using navicat connection
The authentication plug-in "caching_sha2_password" cannot be loaded.
Solve
Open the system preferences, locate mysql, and click Initialize Database.
Enter your new password.
Select 'Use legacy password'.
Restart the mysql service.
You can now use the Navicat link
After testing, I found that every time the terminal is turned off, I need to re-source. Bash _ profile.
PS: the following tests are still invalid and have not been solved yet
Some articles say vi ~ / .zshrc, add:
Export PATH=$ {PATH}: / usr/local/mysql/bin
After saving, source ~ / .zshrc can be done once and for all.
Some articles mention modifying ~ / .bashrc. If the system is zsh, the modified bashrc is invalid.
These are all the contents of the article "mysql 8.0.11 macos10.13 installation and configuration method Picture and text tutorial". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.