MySQL 5.7.13 uncompressed version (install-free) installation configuration tutorial _mysql

Source: Internet
Author: User
Tags mysql in

MySQL is a relational database management system, the official website is http://www.mysql.com/, divided into MySQL Enterprise Edition (commercial), MySQL Cluster CGE, MySQL Community Edition Three versions, the first MySQL Enterprise edition need to spend money to provide technical support. The second MySQL Cluster, to balance multiple databases on the basis of MySQL Enterprise edition or MySQL Community edition. The third MySQL Community Server, this free, next we will install it, the installation package has two kinds of formats , one is the MSI format (installation version), one is the ZIP format (no installation, need to configure a direct can be used).
preparatory work: MySQL ZIP Format installation package, Mysql-5.7.13-win32.zip, download address http://dev.mysql.com/downloads/mysql/
Method/Step
1. Download MySQL in http://dev.mysql.com/downloads/mysql/


2. After decompression, the folder can be renamed, such as MySQL, placed in the appropriate location, such as in the C:\mysql path.

3. Configure the Environment:
My Computer-> Properties-> Advanced-> Environment variables
Select path to add after it: your Mysql\bin folder paths (e.g., C:\mysql\bin)
Path= ...; C:\mysql\bin (add a semicolon at the end of path; and fill in the path)

4. Modify the MySQL folder under the configuration file, the default folder has a configuration file named My-default, modify it to my

Then modify or add the configuration in it (figure):
[Mysqld]
Basedir= "C:\mysql\" (MySQL directory)
Datadir= "C:\mysqldata\" (MySQL data directory, you need to create a folder under C disk Mysqldata)

Under C disk, create a new Mysqldata folder.

5. Run cmd as Administrator, execute command mysqld--initialize initialize 1 text files, and place the following command on a single line: Set PASSWORD for ' root ' @ ' localhost ' = PASSWORD (' Mynewpassword '); Save the file with any name. In this case, the file is C:\mysqldata\init.txt. Executing mysqld--init-file=c:\mysqldata\init.txt on the command line

This command will not automatically exit, open another cmd (do not need administrator rights), execute command mysql-u root-p, press ENTER, enter password for Mynewpassword, you can enter MySQL.

The Exit Mysqld service can end the Mysqld.exe process through Task Manager.

6 run cmd as Administrator, enter mysqld--install install MySQL service.

In the Computer Management Service will appear MySQL service, later want to enter MySQL, direct start MySQL service can.

There will be an error starting MySQL:

the reason for the error is that the MySQL execution file cannot be found, processed by modifying the registry, to the registration table Hkey_local_mechine---SYSTEM---currentcontrolset---services Change to find the MySQL key value, and then change the path.
Through the "Win" key +r press together, bring up the "run" window, input regedit call out the registry
Find Hkey_local_mechine---SYSTEM---currentcontrolset---services

Find MySQL in Services


Change the path where the ImagePath value is mysql\bin, such as in this example: "C:\mysql\bin\mysqld" MySQL


This time the modification is done.

In the future, to enter MySQL, the first to start the MySQL service, through the command line to execute net start MySQL or in the Computer Management services under the start of MySQL, and then at the command line to enter Mysql-u Root-p enter.

This is the MySQL 5.7.13 installation configuration method, I hope to help you learn.

Related Article

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.