In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article shares the installation and use of MySQL version 5.7 detailed tutorials, change the storage path of the database data, for your reference, the details are as follows
Because I saw that mysql5.7 added a new feature, documentation.
So reinstall the mysql5.7 version and paste the steps by the way
(a) download:
Official website link
Step: [Downloads- > Community- > MySQL on Windows- > MySQL Installer]
Note: if you don't have an oracle account, sign up for one, then go to this interface to login and download
(2) installation:
After the download is complete, double-click the installation:
Next, next all the way.
Here we need to create our own user password and set up the next
Cofig type selects development machine, sets protocol, port-related content, next
Click the following figure to modify:
Select standard system account
Click execute
Next
You need to enter the password here, then click the check button
Click execute
Installation completion interface:
Finish
(3) verify the login:
Method 1: find the newly installed mysql with the help of command line: start menu, and select command line client-Unicode
Enter the password, and the interface that appears indicates successful installation. Enter show databases: verify.
Method 2: set the mysql environment variable with cmd, as shown in the figure
Enter mysql-h 127.0.0.1-u root-p or directly mysql-u root-p to log in.
(4) use the workbench visualization tool:
From the start menu, find the newly installed mysql and click workbench to open it.
Note: click the gray area:
Workbench visualization platform is more intuitive and convenient.
At this point, the installation of our entire mysql is over.
Next, by the way, I'll show you how to change the mysql storage path:
(1): stop the mysql service
(1) run cmd as administrator-> search cmd- > right-click administrator to run (or shift+ctrl+enter after entering cmd by Win+R)
(2) > > net stop MySQL57 (Service name of mysql: search method: right-click my computer-> manage-> Service, and then find the service name of mysql)
(3) copy the files in the data directory under the mysql installation path (usually C:\ ProgramData\ MySQL\ MySQL Server 5.7\ Data) to the path you want to store, such as G:\ filecode\ mysqlData.
(4) copy the my.ini configuration file under C:\ ProgramData\ MySQL\ MySQL Server 5.7 to the desktop. Open notepad and change the section # Path to the database root datadir= "C:/ProgramData/MySQL/MySQL Server 5.7/Data/" found in Datadir to: Datadir= "G:/filecode/mysqlData/" [Note: this is "/" instead of "\", as is the usual configuration file]
Put it back to the original path after saving [the reason why it is copied to the desktop first is because, if you do not do so, the "access denied" warning will pop up when the change is saved and cannot be modified]
(5) restart the mysql service to verify whether it is successful. Enter cmd à > > net start MySQL57 and then enter mysql to create a database to have a look.
Mysql-u root-pinput passwdcreate database HelloWorld
You can see that the database of HelloWorld is not generated in the original data directory, but the database of HelloWlorld is added to our new mysqlData path directory. This is the end of this.
I hope it helps.
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.