Windows Decompression Edition installs 64-bit mysql-5.7.19

Source: Internet
Author: User

Installation of MySQL software:

Mysql-5.7.19-win64.zip (https://dev.mysql.com/downloads/mysql/) is now mysql-5.7.20-win64.zip.

Baidu Network Disk Link: Http://pan.baidu.com/s/1jHNVunW Password: Cvyz

Find a directory to store the installation:

My directory is: D:\SOFTWARE\MYSQL

With personal hobbies, you can find your own directory to unzip files.

The following files are extracted: ( There is no Data folder and My.ini configuration file in the extracted file )

Create a new Data folder and a My.ini configuration file in the MySQL installation root directory for initialization use.

The My.ini configuration file is as follows:

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

[Mysqld]
port=3306
Character_set_server=utf8
# Set the installation directory for your MySQL
Basedir=d:\\software\\mysql
# Data Directory set to MySQL
Datadir=d:\\software\\mysql\\data
Sql_mode=no_engine_substitution,no_auto_create_user

[Winmysqladmin]
D:\\software\\mysql\\bin\\mysqld.exe

#开启查询缓存
Explicit_defaults_for_timestamp=true
# Skip-grant-tables

Run the Command Line window as an administrator and switch to the bin directory of the MYSQL installation path, which is D:\software\MySql\bin

Enter the mysqld--install command to add MySQL to the local service

D:\software\mysql\bin> mysqld--install

Then perform the initialization: mysqld--defaults-file=:D: \software\mysql\my.ini--initialize (note--defaults-file as the newly created My.ini file, Using the--initialize parameter, the MySQL service generates a random password display, remember this password, and here you can also use the--initialize-insecure parameter, the MySQL service does not generate an initialization password, That is, Root does not need to enter the password to log in the initial connection)

D:\software\mysql\bin> mysqld--defaults-file=:D: \software\mysql\my.ini--initialize

Start MySQL service d:\software\mysql\bin>net start MySQL

Connect to MYSQL service D:\software\mysql\bin>mysql-u root-p

Enter Password:_(enter a random password here or empty)

Set a new password for the root user: Select the system's built-in database named MySQL, update the user table root password, such as password V!tpzp6n?ko), and finally refresh the permissions related table, so that the update takes effect
mysql> use MySQL;
mysql> Update user Set authentication_string = password (' V!tpzp6n?ko) ') where user = ' root ';
mysql> flush Privileges;

Windows Decompression Edition installs 64-bit mysql-5.7.19

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.