Mysql 5.7.11 winx64 installation and configuration tutorial, 5.7.11winx64

Source: Internet
Author: User

Mysql 5.7.11 winx64 installation and configuration tutorial, 5.7.11winx64

This document uses mysql5.7.11as an example to describe how to install mysql5.7.zip in windows.

I. Prerequisites:

1. win Administrator

2. MySQL installation package (zip package)

Ii. Installation Process

First decompress the MySQL installation package to the path you want to install (such as D: \ javaide \ mysql-5.7.11-winx64), then edit the my-default.ini file, configure the database root directory under [mysqld], data storage directory, software Port:

Basedir = D:/javaide/mysql-5.7.11-winx64
Datadir = D:/javaide/mysql-5.7.11-winx64/data
Port = 3306
In addition to the above configuration, you can continue to configure the default character encoding for the server under [mysqld:

Character-set-server = utf8
After configuring, save and change the my-default.ini TO my. ini.

Open cmd as the administrator, switch to the database bin directory, and execute mysqld install:

D: \ javaide \ mysql-5.7.11-winx64 \ bin> mysqld install
After successful installation, a message is displayed:

Service successfully installed.

Iii. Initialization

After the mysql service is successfully installed, You can initialize the database and run the following command in the database bin directory:

Copy codeThe Code is as follows: D: \ javaide \ mysql-5.7.11-winx64 \ bin> mysqld.exe -- defaults-file = "D: \ javaide \ mysql-5.7.11-winx64 \ my. ini" -- initialize -- explicit_defaults_for_timestamp
Default-file is the server configuration file path, which must point to your own installation directory.

After the initialization is successful, no prompt is displayed. dos returns the receiving command status:

D: \ javaide \ mysql-5.7.11-winx64 \ bin>

4. Start the database and change the password

After the database is initialized, you can start the database service by running the net start mysql command:

D: \ javaide \ mysql-5.7.11-winx64 \ bin> net start mysql
Additional supplement: Stop mysql service commands

D: \ javaide \ mysql-5.7.11-winx64 \ bin> net stop mysql
After the database is started, a message indicating success is displayed:

MySQL service is starting...
The MySQL service has been started successfully.
Next, you can find the login password. The login password is in the data directory (my. ini configuration of the datadir directory) in the log file, such as My in D: \ javaide \ mysql-5.7.11-winx64 \ data. The file name is the computer name. err; for example, my computer named LAPTOP-J709AKSF, the password is in the LAPTOP-J709AKSF.err file, open the file with notepad or notepad ++ or any text editor, ctrl + f, search for the password keyword,

Find the following line:

2016-03-16T02: 41: 45.969406Z 1 [Note] A temporary password is generated for root @ localhost: r1diaBlw & Hgp
The logon password is r1diaBlw & Hgp.

Log on to mysql with root:

D: \ javaide \ mysql-5.7.11-winx64 \ bin> mysql-u root-p
Enter the password:

Enter password :************
After successful login, you can change the root password (change the password to root as follows ):

Mysql> set password = password ('root ');
After the modification is successful, the following message is displayed:

Query OK, 0 rows affected, 1 warning (0.27 sec)
After successful modification, you can log out with the new password.

Mysql> exit
Bye

The above is the mysql 5.7.11 winx64 installation and configuration tutorial. I hope it will be helpful to everyone's learning, and I hope you can support more help.

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.