Installation and configuration of mysql_5.7.17

Source: Internet
Author: User

1. Download the installation package

https://dev.mysql.com/downloads/mysql/

2. Unzip the MySQL archive package

After the download is done, unzip it and put it in the directory you want to install, for example: D:\ruanjian\mysql-5.7.17-winx64

3. Create and modify the configuration file My.ini

Create a new My.ini configuration file, the original My-default.ini profile is just a template, do not change it inside.

The contents of My.ini are as follows:

Mysql]default-character-set=utf8[mysqld]port = 3306basedir=d:\ruanjian\mysql-5.7.17-winx64datadir=d:\ruanjian\ Mysql-5.7.17-winx64\datamax_connections=200character-set-server=utf8default-storage-engine=innodbexplicit_ Defaults_for_timestamp=true

Default-character-set #客户端默认字符集

Basedir #安装目录

DataDir #数据库的数据的存放目录

Max_connections #允许最大连接数

Character-set-server #服务端使用的字符集

Default-storage-engine=innodb #创建新表时将使用的默认存储引擎

Explicit_defaults_for_timestamp=true #从MySQL5.6, the default behavior of timestamp is deprecated. So add this line to avoid warning.

4. Create a new empty Data folder under the installation path.

5. Add Environment variables

5.1 "New" A variable named "Mysql_home" in the system environment variable. Variable value: "D:\mysql\mysql-5.7.17-winx64"

5.2 Edit the existing environment variable "Path" and Add "%mysql_home%\bin" at the end.

6. Run cmd as administrator, enter the bin directory, and execute the mysqld--initialize-insecure--user=mysql command. Without this step, the service cannot be started after the installation is complete.

7. Install MySQL

Still under the bin directory of the Administrator cmd window, perform the mysqld install command installation. When you are finished, you will be prompted to install successfully.

8. Start

Still under the bin directory of the Administrator cmd window, execute the net start mysqld command to start the MySQL service.

9. Login

In the normal cmd window, go to the bin directory, execute mysql-u root-p command, default no password, enter

10. Modify Login Password

Alter user ' root ' @ ' localhost ' identified by ' new password ';

Installation and configuration of mysql_5.7.17

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.