MySQL installation on Windows

Source: Internet
Author: User

1. Download MySQL Community Server 5.7.14

Index of/mysql/downloads/mysql-cluster-7.12. Unzip the MySQL Compression pack installation path: E:\Program files\mysql\mysql Server 5.7

3. Add Environment variables

Variable name: mysql_home

Variable value: E:\Program files\mysql\mysql Server 5.7

This is the custom unzip directory for MySQL.

Add%mysql_home%\bin in Path again

4. Registering Windows System Services

Registering MySQL as a Windows system service

The operation is as follows:

1) Create a new My.ini file and copy the My.ini file to the C:\Windows directory, the My.ini content is as follows:

[Client]
port=3306
Default-character-set=utf8

[Mysqld]
# Set the installation directory to MySQL
Basedir=d:\program Files (x86) \mysql5.6.14
# Data Directory set to MySQL
Datadir=d:\program Files (x86) \mysql5.6.14\data
port=3306
Character_set_server=utf8
Sql_mode=no_engine_substitution,strict_trans_tables

2) from the console into the bin directory under the MySQL decompression directory.

3) Enter the Service installation command:

Mysqld.exe-install

If Install/remove of the Service denied! appear

Because window 7 is more restrictive than vista.
Go to C:\Window\System32 Find CMD.EXE right-click to select as Administrator, and then go to the corresponding directory to execute the command, everything is OK.

A successful installation will prompt the service to install successfully.

Note: The My-default.ini file is available in the root directory after MySQL decompression, if not, from somewhere else.

The Removal Service command is: mysqld remove

5. Start the MySQL service

Method One:

The Start service command is: net start MySQL

Method Two:

Open the Administration Tools service and locate the MySQL service.

Start the service by right-clicking to start or by tapping on the left-hand boot directly.

6. Change the password of the root account

The default password for the root account is empty when the installation is complete, and you can modify the password to the specified password. Example: 123456

Method One:

C:>mysql–uroot

Mysql>show databases;

Mysql>use MySQL;

Mysql>update user SET Password=password ("123456") WHERE user= ' root ';

Mysql>flush privileges; "Attention must not forget this sentence, otherwise the password change cannot take effect"

Mysql>quit

Method Two:

Use third-party management tools for password modification. such as Navicat for MySQL

MySQL installation on Windows

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.