Mysql 5.7.20 common download, installation and configuration methods and simple operation skills (extract version without installation), mysql5.7.20

Source: Internet
Author: User

Mysql 5.7.20 common download, installation and configuration methods and simple operation skills (extract version without installation), mysql5.7.20

The installation of a MySQL version 5.7.19 was just completed in the early morning, and the latest version 5.7.20 was not expected to be released officially in the early morning. This version does not seem to be updated much, but adds a feature that we urgently need.

Parameters added for MySQL 5.7.20group-replication-member-weightIndicates the priority of the server when the master node is selected. Without this priority, MGR of the previous version will select a node that may not be desired by the user, which is a headache. We believe that this parameter added in version 5.7.20 can solve some pain points of users.

1. Download:

Mysql-5.7.20 is unzipped version free installation, mysql-5.7.20:

Http://dev.mysql.com/downloads/mysql/

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

 

Download directly without registration or logon.

2. installation:

Place the downloaded mysql compressed package's unzipped directory in your favorite location.

3. Configuration:

Use notepad ++ to create an ini file named my. ini and place it in the mysql installation directory. The file content is:

[Mysql] # set the default character set of the mysql client default-character-set = utf8 [mysqld] # set port 3306 to port 3306 # set the mysql installation directory basedir = D: \ mysql \ mysql-5.6.17-winx64 # Set the mysql database data storage directory datadir = D: \ mysql \ mysql-5.6.17-winx64 \ data # maximum number of connections allowed max_connections = 200 # the character set used by the server defaults to the 8-bit latin1 character set character-set-server = utf8 # default storage engine default-storage-engine = INNODB

(When starting the service later, some friends will see: "mysql service cannot start the service and no error is reported." In fact, mysql has no data directory after mysql 5.6, many users will create a data directory according to the previous version of the installation, so that mysql cannot be started .)

4. Install and start the mysql service:

4.1 install the mysql service:

Open the cmd window as an administrator and switch the directory to the bin directory of your mysql installation directory.

Then, enter mysqldinstall In the cmd window and press enter to run the command.

Note: Run cmd as an administrator.

Entermysqld--initialize-insecure --user=mysql

(After executing the preceding command, MySQL creates a data folder and creates a default database. The logon username is root and the password is blank.) (the origin of the data folder) (If you do not run this command, an error is returned when you directly start the service)

4.2 start the mysql service:

Enter net start mysql to start the service. OK is successful. Of course, you can also find mysql to start the mysql service in "Computer Management-service and application-service.

After starting the service, if you do not want to switch the directory in cmd and want to directly enter the mysql statement, you need to add the path of the bin directory of the mysql installation directory to the path variable of the system environment variable.

Note that when installing the mysql service, you must switch to the bin directory of the mysql installation directory, whether or not you have configured the environment variables, otherwise, after the installation is complete, an error will still be reported-"system error occurs 2 the system cannot find the specified file. ".

4.3 close the mysql Service

When you need to disable the mysql service, switch to the bin directory of the mysql installation directory. Enter net stop mysql.

5. Basic mysql operations:

After the service is started, if you add the path of the bin directory of the mysql installation directory to the path variable of the system environment variable, then, you do not need to switch to the bin directory for mysql operations in cmd.

5.1 log on to/enter the mysql database

Enter mysql-u root-p in the cmd window, press enter, and enter password again.

Because no user name or password is set during installation, the default logon user name is root and the password is blank.

5.2 initialize Password

When the root user logs on to mysql, enterSET PASSWORD FOR root=PASSWORD('password');

5.3 view databases and data tables

mysql>show databases;mysql>use sys;mysql>show tables;

5.3 exit mysql> enter

5.4 note:

When a command is entered, the line feed does not allow mysql to terminate the input and execute the command. To execute the command, you must add a semicolon (;) after the command (;)

Summary

The above is a small series of practical mysql 5.7.20 download, installation and configuration methods and simple operation skills, I hope to help you, if you have any questions, please leave a message, the editor will reply to you in a timely manner. Thank you very much for your support for the help House website!

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.