1.MYSQL5.7.19 mounting configuration step over the pit

Source: Internet
Author: User

This article is mainly about sharing some of the problems encountered while installing MySQL, as well as workarounds.

The first step: download MySQL

: Https://dev.mysql.com/downloads/mysql/5.1.html#downloads

I downloaded the 5.7.19 version, there is only the decompression version, download and then the environment variable configuration can be.

2. Unzip and install the Mysql5.7.19

(1) Extract the downloaded package to the specified path, you can specify the path, I directly extracted to the D disk, extracted to the D:\MYSQ directory. The full path to the MySQL package is:

(2) Configure environment variables:

New system Environment variables:

Key Name: Mysql_home

Value is: D:\mysql

Then add the path:%mysql_home%\bin

3. Prepare the My.ini file

After the 5.7.18 version, after decompression, we will manually create a good My.ini file, and then placed in the specified directory.

(1) Create a new text document (that is, open Notepad), and then change the name to My.ini. Paste the contents below into Notepad.

?
  

[ Client]

port= 3306

[mysqld]

port= 3306

basedir=d:\mysql

datadir=d:\mysql\data

max_connections=200

character-set-server=utf-8

default-storage-engine=innodb

sql_mode=no_engine_substitution,strict_trans_tables

[mysql]

default-character-set=utf-8 e

(2) After establishing the My.ini file, copy and paste it to D:\mysql-5.7.19-winx64\bin, and put it in the bin directory where MySQL resides.

4. Open a command prompt with administrator status

5. Switch directories to the bin directory where the MySQL package resides. then enter Mysqld.exe-install

After executing the command, prompt:Service successfully installed. Indicates that the installation was successful.

6. Initialize the MySQL data and create a root user with a blank password, and open cmd to execute the following command:

Mysqld--initialize-insecure--user=mysql

Note: The last parameter--user=mysql may not be added in Windows, but it seems to be important under UNIX and other systems.
After the command is executed, after a while, the system automatically generates the corresponding data directory and automatically creates the root user for the empty password. This indicates that the initialization was successful.

Note: Be sure to copy the My.ini file to the data directory.

Because the entire process configuration has completed before, it can start normally, but the next time you start up, the MySQL service will not start the error.

If no INI does not exist, the data directory cannot be started successfully

7. At cmd (Command prompt), enter the following command to start the MySQL service.

net start MySQL
After execution, prompt:
The MySQL service is starting:
The MySQL service has started successfully.
Note: To log in using MySQL, the service is required to be started first.

8. After the service starts, because the root user you just created is a blank password, you can set the password as needed.

Execute the following command:

Mysqladmin-u root-p Password Enter a new password here
Enter Password: Enter the old password here

Please note: After entering the old password (or the direct return without the password), the system has not responded for a long time, then error (10060).

Cause: MySQL does not pass Windows Firewall

Workaround: Add D:\mysql\bin\mysqld.exe to the app that Windows Firewall is allowed to pass through.

9. At this point, the decompression installation of MySQL v5.7.18 has been completed , so you need to stop the previously started MySQL service, execute the following command:

Exit MySQL page: Ctrl + Z, enter.
Stop service: net stop MySQL

Log in and use MySQL

The previous installation of MySQL database, as long as the installation is successful, you can log in to the root user, and data related operations, such as: Build table, add, delete, change, check and so on. The following is a simple process:

1. Open cmd as Administrator and cut to the bin directory of the MySQL installation directory

2.net start MySQL//Description: The command is to start the MySQL service
Mysql-u root-p//Description: This command is logged in to the root user
Enter Password: The password of the root user that was previously set

3. After the correct login, the data can be manipulated such as: increase, delete, change, check and so on.

4. When the database is no longer being used, to exit the user and stop the service, execute the following command:mysql> quit;

5.net stop MySQL

Summary : The above is the MySQL installation configuration of the entire process, including two step over the pit, hoping to help friends.

1.MYSQL5.7.19 mounting configuration step over the pit

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.