Mysql-8.0.11-winx64 (free install version) configuration

Source: Internet
Author: User
Tags dedicated server

1. Unzip the ZIP package to the installation directory

First, extract the Mysql-8.0.11-winx64.zip into the installation d:/mysql-8.0.11-winx64 directory,

2. Configuration files

Add My.ini under the installation root directory
Basic configuration file (my)

[mysqld]basedir = D:\mysql-8.0.11-winx64datadir = D:\mysql-8.0.11-winx64\dataport = 3306lower_case_table_names = 2default_authentication_plugin=mysql_native_password

Refer to Basic configuration:

 [mysqld]# Remove leading # and set to the amount of RAM for the most important data# cache in MySQL. Start at 70% of all RAM for dedicated server, else 10%.# innodb_buffer_pool_size = 128m# Remove Leading # to turn on a V ery important data Integrity option:logging# changes to the binary log between backups.# log_bin# These is commonly set, Remove the # and set as Required.basedir = D:\Program\MySQLdatadir = D:\DBs\MySQLport = 3306# server_id = ... # remove L Eading # To set options mainly useful for reporting servers.# the server defaults is faster for transactions and fast SEL ects.# Adjust sizes as needed, experiment to find the optimal values.# join_buffer_size = 128m# sort_buffer_size = 2m# rea D_rnd_buffer_size = 2M Sql_mode=no_engine_substitution,strict_trans_tables character-set-server = utf8mb4performance _schema_max_table_instances = 600table_definition_cache = 400table_open_cache = 256[mysql]default-character-set = Utf8mb4[client]default-character-set = Utf8mb4  
3. Initializing the database

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

mysqld --initialize --console

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

  2018-04-20t02: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 be merged with strict mode in a future release.2018-04-20t02:35:01.507640z 0 [System] [MY-013169] [Server] D:\Pr Ogram\mysql8\bin\mysqld.exe (mysqld 8.0.11) initializing of server in progress as process 110642018-04-20t02 : 35:01.508173z 0 [ERROR] [MY-010340] [Server] Error message file ' D:\Program\MySQL\share\english\errmsg.sys ' had only 109 0 error messages, but it should contain at least 4512 error messages. Check The above file is the right of version for this program!2018-04-20t02:35:05.464644z 5 [Note] [MY-010454] [Server] A temporary password is generated for [email protected]: apwcy5ws&hjq2018-04-20t02:35:07.017280z 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 you do not remember, it is OK, delete the initialized DataDir directory, and then execute the initialization command again, and then regenerate. 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:

mysqld --install [服务名]
4. Start the service
net start MySQL
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.

Previously, MySQL's password authentication plugin was "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

Mysql-8.0.11-winx64 (free install version) configuration

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.