MySQL5.6 Installation Steps

Source: Internet
Author: User

1. Download MySQL Community Server 5.6.37

Https://dev.mysql.com/downloads/mysql/5.6.html#downloads

2. Unzip the MySQL archive package

Unzip the downloaded MySQL archive into a custom directory. For example D:\Program files\mysql-5.6.37-winx64

3. Add Environment Variables

My Computer ---properties ---advanced ---environment variables

1. variable name:mysql_home

Variable value:D:\Program files\mysql-5.6.37-winx64

This is the custom unzip directory for MySQL.

2. Add %mysql_home%\bin (separated by semicolons) in Path

4. Registering Windows System Services

Registering MySQL as a Windows system service

The operation is as follows:

1) from CMD into the bin directory under the MySQL decompression directory:

C:\USERS\ADMINISTRATOR>CD D:\Program files\mysql-5.6.37-winx64
C:\users\administrator>d:
D:\Program Files\mysql-5.6.37-winx64>cd Bin
D:\Program files\mysql-5.6.37-winx64\bin>

2) Enter the Service installation command:

Under Administrator privileges

Mysqld Install MySQL--defaults-file= "D:\Program Files\mysql-5.6.37-winx64\my-default.ini"

A successful installation will prompt the service to install successfully.

Service successfully installed.

Note: The My-default.ini file is in the root directory after MySQL decompression

The Removal Service command is: mysqld remove

5. Start the MySQL service

Method One: Start the service command for: net start MySQL

Method Two: Open the Administration Tools service and find 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:

Enter in cmd

C:>mysql–uroot

Mysql>show databases;

Mysql>use MySQL;

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

Mysql>flush privileges;

Mysql>quit

Method Two:

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

7 Root Remote Access

Run on the machine where MySQL is installed:

Go to MySQL server

D:\mysql\bin\>mysql-h Localhost-u Root-p

Give any host access to data

Mysql>grant all privileges on * * to ' root ' @ '% ' with GRANT OPTION;

Make the changes effective

Mysql>flush privileges;

Log out of MySQL server

Mysql>exit

8 Licensing

You want to use root 123456 from any host to connect to the MySQL server.

Mysql>grant all privileges on * * to ' root ' @ '% ' identified by ' 123456 ' with GRANT OPTION;

If you want to allow the user jack to connect to the MySQL server from the IP-10.10.50.127 host and use 654321 as the password

Mysql>grant all privileges on * * to ' jack ' @ ' 10.10.50.127 ' identified by ' 654321 ' with GRANT OPTION;

mysql> FLUSH privileges;

MySQL5.6 Installation Steps

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.