Mysql Zip package installs the configuration on Windows

Source: Internet
Author: User

Environment: Windows7 64-bit system, mysql-5.7.16-winx64.zip

1. Download the required MySQL zip package on the MySQL official website, as I downloaded the mysql-5.7.16-winx64.zip;

2, decompression to the local disk (such as D disk), the extracted folder is mysql-5.7.16-winx64, renamed to Mysql-5.7.16;

3, into the mysql-5.7.16 folder, the default profile shown is My-default.ini, the configuration file is less configuration, I have re-created a new configuration file My.ini;

4, double hit Open My.ini, enter the configuration content:

[Client]

Port = 3306

Default-character-set = UTF8

[Mysqld]

Port = 3306

Character_set_server = UTF8

Basedir = D:\mysql-5.7.16

DataDir = D:\mysql-5.7.16\data

Sql_mode=no_engine_substitution,strict_trans_tables

Save the configuration file;

5. Set the Windows environment variables: Right click on desktop "Computer"-Properties-Advanced system settings-environment variable-system variable-path, in the Open Variable Value box finally add the path D:\mysql-5.7.16\bin, save;

6, enter CMD in Windows run, enter the command line window, input D:, enter the D drive, enter the CD Mysql-5.7.16\bin, return into the bin directory, enter the following three commands;

A, command: mysqld--initialize initialize MySQL, generate the files in the data;

B, command: Mysqld-install install MySQL

C, command: net start MySQL start MySQL service

Note: Some other commands: Mysqld-remove uninstall MySQL; net stop MySQL stop MySQL service;

The difference between MySQL and mysqld: MySQL for the client program, MYSQLD for the server-side program;

7, configure the above can login MySQL:

A, the first login because there is no root password, login will error, at this time in the configuration file My.ini add Skip-grant-tables, save, restart the MySQL service, in cmd, enter: net stop MySQL; net start MySQL; Mysql-uroot-p, enter directly after the login;

B. Set the root password:

① into MySQL database: use MySQL;

② Set Password: Update user set Authentication_string=password (' xxx ') where user= ' root ' and Host = ' localhost '; (Version 5.7)

Update user set Password=password ("xxx") where user= "root"; (version 5.5)

③ Exit Database: Exit (or quit)

④ password changed, then enter My.ini, comment off skip-grant-tables, save;

⑤ Restart the MySQL service, re-login can be;

8. Login MySQL again, enter command: Alter user ' root ' @ ' localhost ' identified by ' xxx ';

Quit: Quit

The installation configuration is complete! You can start using MySQL.

Mysql Zip package installs the configuration on Windows

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.