Deploy MySQL database under window

Source: Internet
Author: User

Official website: Https://dev.mysql.com/downloads/mysql/,MySQL Community (Community Edition) Server 5.7.21, after the download is complete, unzip the file.

(1) in the MySQL directory, add the My.ini file, the content is as follows:

[client]port=3306default-character-set=utf8[mysqld]port=3306character_set_server=utf8basedir=e:\mysql-5.7.21# Unzip directory datadir=e:\mysql-5.7.21\data# extract directory under Data directory Sql_mode=no_engine_substitution,strict_trans_tables

(2) Use the administrator to run the cmd command, switch directories to E:\mysql-5.7.21\bin (according to the specific installation directory), execute the command, install MySQL:

Mysqld--initialize-insecure--user=root;

(3) Start MySQL, configure the root account, default is no password.

Mysql-u root-p; UPDATE user SET authentication_string =password (' 123456 ') WHERE user= ' root '; flush privileges;

(4) Common mistakes, forgot password:

In My.ini Add startup parameters, skip password verification, as follows:

[client]port=3306default-character-set=utf8[mysqld]port=3306character_set_server=utf8basedir=e:\mysql-5.7.21# Unzip directory datadir=e:\mysql-5.7.21\data# extract directory under Data directory Sql_mode=no_engine_substitution,strict_trans_tables  Skip-grant-tables[Winmysqladmin]

To restart MySQL:

net stop mysql;net start MySQL;

Continue the above process to modify the password, after the modification, comments out, restart MySQL can use the account password login.

Deploy MySQL database under window

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.