MySql 5.7.20 installation and data and my. ini file configuration, 5.7.20my.ini

Source: Internet
Author: User

MySql 5.7.20 installation and data and my. ini file configuration, 5.7.20my.ini

1. First download from the MySql Official Website

Https://dev.mysql.com/downloads/mysql/

Http://www.bkjia.com/softs/451120.html

Take the version I selected as an example (no installation version). Select MYSQL Community Server and select your corresponding version on the right. I download the corresponding zip version with 64 bits.

Download decompressed to the location you want to store my is decompressed to D: \ mysql-5.7.20-winx64

After decompression, there is no data file or my. ini configuration file, which must be added by yourself (supplemented below)

Next, set the environment variables. For w10, open the system variable and configure the mysql environment variable. The command line is used to open the system variable.

Create the MYSQL_HOME variable. The variable value is the location where you extract the variable.

Add % MYSQL_HOME % \ bin in Path. (Note that a semicolon exists at the end)

Finally, the MySql environment variable configuration is completed after saving.

Next we will add the data file and my. ini

Open cmd with the Administrator in the D: \ mysql-5.7.20-winx64 \ bin directory (there are several ways for the Administrator to open cmd, one of which can be through win + x and then select the command prompt (Administrator) after opening, remember to go to the D: \ mysql-5.7.20-winx64 \ bin directory in DOS) and then runMysqld -- initialize-insecure -- user = mysql(Note that there are spaces)

Then return to the directory and you will find the data directory.

Create the my. ini file and the content is (the content here may not follow the instructions below but is similar to the content below)

[Client] port = 3306default-character-set = utf8 [mysqld] # Set to your own MYSQL installation directory basedir = D: \ mysql-5.7.20-winx64 # Set to MYSQL's data directory datadir = D: \ mysql-5.7.20-winx64 \ dataport = 3306character_set_server = utf8sql_mode = NO_ENGINE_SUBSTITUTION, NO_AUTO_CREATE_USER # enable query cache explicit_defaults_for_timestamp = trueskip-grant-tables

After the above two files are created, or in D: \ mysql-5.7.20-winx64 \ bin with the administrator run cmd Enter command mysqld-install if the Service successfully installed appears, it indicates the registration is successful

Because I have already registered it,

Runnet start mysqlCommand (start MYSQL Command) will appear

Net stop mysql Command (stop MYSQL Command)

At this point, you have completed MySql-related download and configuration.

Summary

The above section describes how to install MySql 5.7.20, data, and my. I hope to help you with the configuration of the INI file. If you have any questions, please leave a message and I will reply to you in a timely manner. Thank you very much for your support for the help House website!

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.