MySQL 5.7 installation and simple use (Graphic tutorial), mysql5.7
Installation and Use of MySQL 5.7
It is still detailed and even tedious. Many steps are omitted in other tutorial documents, but I still want to write them out because I had taken many detours, I hope you can avoid these detours. Of course, you can skip it if you know what you want.
Because mysql5.7 has added the new documentation feature
So I re-installed mysql5.7, and paste the step
(1) download:
Download from the official website.
Step: [Downloads-> Community-> MySQL on Windows-> MySQL Installer]
Note: If you do not have an oracle account, register one and go to the login interface to download
(2) installation:
After the download is complete, double-click to install:
Next one
Here we need to create our own user password and set the next
Cofig type select development machine, SET protocol, port content, and next
Press modify:
Select standard system account
Click execute
Next
Enter the password and click check.
Click execute
Installation completion page:
Finish
(3) login verification:
Method 1: use command line:
Start the menu and find the newly installed mysql. SELECT command line client-Unicode.
Enter the password. The displayed interface indicates that the installation is successful. Enter show databases: Verify
Method 2: Use cmd
Set mysql environment variables,
Enter mysql-h 127.0.0.1-u root-p or directly mysql-u root-p
Enter the password to log on.
(4) use the workbench visualization tool:
Start the menu, find the newly installed mysql, and click Open workbench
Note: Click the gray area:
The workbench visualization platform is intuitive and convenient.
Here, the installation of mysql is over!
Next, we will teach you how to change the mysql storage path:
(1) Stop the mysql Service
(1) Run cmd as an administrator
Start-> Search cmd-> right-click the Administrator to run the command (or press "Win + R" and then "shift + ctrl + enter)
(2)> net stop MySQL57 (mysql service name: Find the method: Right-click my computer-> Manage-> service, and find the mysql service name)
(3) copy the files (usually C: \ ProgramData \ mysql \ MySQL Server 5.7 \ data) in the Data directory under the MySQL installation path to the desired storage path, for example: g: \ filecode \ mysqlData;
(4) copy the my. ini configuration file under C: \ ProgramData \ MySQL Server 5.7 to the desktop, and open the section Datadir in notepad.
#Path to the database root datadir=”C:/ProgramData/MySQL/MySQL Server 5.7/Data/”
To:
Datadir = "G:/filecode/mysqlData/" [Note: here is "/" instead of "\". This is the case for common configuration files]
Save and put it back to the original path.
[Copy the file to the desktop first because, if you do not do this, the "Access Denied" warning will pop up when you save the modification so that it cannot be modified]
(5) restart the mysql service to verify whether it is successful. The Administrator will go to cmd à> net start MySQL57
Go to mysql and create a database.
mysql –u root –pinput passwdcreate database HelloWorld;
We can see that the original data directory does not generate the HelloWorld database, but the HelloWlorld database is added to the mysqlData directory we created.
Thank you for reading this article. I hope it will help you. Thank you for your support for this site!