Windows10+mysql8.0.11zip Installation

Source: Internet
Author: User

Get ready:

MySQL8.0 Windows Zip Package: https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.11-winx64.zip

Environment: Windows 10

First, installation

1. Unzip the ZIP package to the installation directory

My installation directory is D:\Program files\mysql-8.0.11-winx64

2. Configuration files

The configuration file in Windows system is the My.ini file in the installation directory by default, some configurations need to be configured during initial installation, and most of them can be changed after the installation is complete, and do not know what others are. My is the file directory does not exist in the My.ini file, so I created the file, as follows

Write the basic configuration as follows:

1 [Mysqld]2 Default_authentication_plugin=mysql_native_password3 # Remove Leading # and set to the amount of RAM for the most important data4 # Cache in MySQL. Start at 70% of all RAM for dedicated server, else 10%.5 # innodb_buffer_pool_size = 128M6 7 # Remove Leading # to turn on a very important data integrity Option:logging8 # Changes to the binary log between backups.9 # Log_binTen  One # These is commonly set, remove the # and set as required. A Basedir=d:\program files\mysql-8.0.11-winx64 - Datadir=d:\program Files\mysql-8.0.11-winx64\data(These two lines are the main modified content, will automatically generate the data folder, other direct paste can)  - Port = 3306 the # server_id = ... -  -  - # Remove Leading # To set options mainly useful for reporting servers. + # The server defaults is faster for transactions and fast selects. - # Adjust sizes as needed, experiment to find the optimal values. + # join_buffer_size = 128M A # sort_buffer_size = 2M at # read_rnd_buffer_size = 2M -  - Sql_mode=no_engine_substitution,strict_trans_tables -  - character-set-server = Utf8mb4 -  in performance_schema_max_table_instances = - Table_definition_cache = to Table_open_cache = +  - [MySQL] the Default-character-set = Utf8mb4 *  $ [Client]Panax NotoginsengDefault-character-set = Utf8mb4

Note that the inside of the Basedir is my local installation directory, DataDir is my database data files to be stored in the location, the configuration needs to be configured according to their own environment.

3. Initializing the database

Execute the command in the bin directory of the MySQL installation directory:

--initialize --console

When execution is complete, the root user's initial default password is printed, such as:

2018-05-01t14:35:01.507037z 0 [Warning] [MY-010915] [Server] ' no_zero_date ', ' no_zero_in_date ' and ' error_for_division _by_zero ' SQL modes should is used with strict mode. They'll is merged with strict mode in a future release.2018-05-01t14:35:01.507640Z0 [System] [MY-013169] [Server] D:\Program\MySQL8\Bin\mysqld.exe (mysqld8.0. one) initializingOfServerIn progressAs Process110642018-05-01t14:35:01.508173Z0 [ERROR] [MY-010340] [Server]Error messageFile' D:\Program Files\mysql-8.0.11-winx64\share\english\errmsg.sys ' hadOnly1090Error messages, but it should containAtLeast4512Error messages.Check that the aboveFileis theRightVersionFor this program!2018-05-01t14:35:05.464644Z5 [Note] [MY-010454] [Server] ATemporaryPasswordIsGeneratedfor [email protected]:APWCY5WS&HJQ2018-05-01t14:35:07.017280Z Span class= "Hljs-number" >0 [ System] [My-013170] [server] d:\program\mysql8\bin\mysqld.exe ( Mysqld 8.0 .11) initializing of server has completed         

Where the 4th line of "APWCY5WS&HJQ" is the initial password, before changing the password, you need to remember this password, subsequent logins need to use.

If your hands are cheap, close quickly, or don't remember, that's fine, delete the initialized DataDir directory, and then execute the initialization command again, and regenerate it. Of course, you can also use security tools, forced to change the password, with what method, their own discretion.

4. Installation Services

Execute the command in the bin directory of the MySQL installation directory:

--install [服务名]

After the service name can not be written, the default name is MySQL. Of course, if you need to install more than one MySQL service on your computer, you can differentiate it with different names, such as MySQL5 and Mysql8.

After the installation is complete, you can start MySQL service from the command net start MySQL.

Two. Change Password and password Authentication plugin

Execute the command in the bin directory of the MySQL installation directory:

mysql -uroot -p

This time will prompt to enter the password, remember the 3rd step of the password, fill in can log in successfully, into the MySQL command mode

Prior to MySQL8.0.4, the execution

SET PASSWORD=PASSWORD(‘[修改的密码]‘);

You can change the password, but the MySQL8.0.4 starts, so the default is no. Because before, MySQL's password authentication plug-in is "Mysql_native_password", and now uses "Caching_sha2_password".

Because there are many database Tools and link packages do not support "Caching_sha2_password", for convenience, I temporarily changed back to the "Mysql_native_password" Authentication plugin.

Execute the command in MySQL:

ALTER USER ‘root‘@‘localhost‘ IDENTIFIED WITH mysql_native_password BY ‘password‘;(注意一定要有分号)(注意一定要有分号)

Modify the password verification plugin and change the password at the same time.

If you want to use the Mysql_native_password plug-in authentication by default, you can configure the item in the configuration file default_authentication_plugin .

[mysqld]default_authentication_plugin=mysql_native_password

Windows10+mysql8.0.11zip Installation

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.