How to install and configure MySql in windows 10

Source: Internet
Author: User

How to install and configure MySql in windows 10

Install the decompressed MySql database in windows 10

Step 1:Decompress the zip file to (my) D: \ MyGreenSoftware \ mysql-5.7.10-winx64

Step 2:Add environment variable (Windows 10 operating system): Right-click computer> Properties> advanced system Settings> environment variable find path and edit path to add it at the end; D: \ MyGreenSoftware \ mysql-5.7.10-winx64 \ bin

Step 3:Add the configuration file, locate the mysql-5.7.10-winx64 file in the decompressed directory of MySQL (for example, my D: \ MyGreenSoftware \ my-default.ini), and add

(Here you need to create a data folder under D: \ MyGreenSoftware \ mysql-5.7.10-winx64 \ data)

[mysqld]basedir=D:\MyGreenSoftware\mysql-5.7.10-winx64datadir=D:\MyGreenSoftware\mysql-5.7.10-winx64\data port = 3306

If the my-default.ini file is not found, create your own my. the ini file (first create a txt file and add the above four lines of code to save and then change the file suffix to ini) create a new text file txt and name it my. ini (note that the extension must also be modified ).

Step 4:Initialize the database. Open CMD as the administrator and run the following command (right-click cmd and run the following command as the administrator) mysqld-initialize-user = mysql-console

Console: [Note] A temporary password is generated for root @ localhost: XXXXXXX
XXXXXX is a randomly generated password (copied and saved)

Step 5:Add MySQL to the system service. Open CMD as an administrator and run the following command:
Mysqld-install MySQL and then execute the net start MySQL console. The service starts successfully.

Step 6:Change the password (a random string is generated, but it is easy to remember)
Run the mysql-u root-p command in the CMD console and press Enter. Enter the saved random password. After the command is successfully executed, the console displays mysql>
Then execute set password for root @ localhost = password ('20140901 ');
Your password has been changed to 123456

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.