MySQL first installation and problem solving

Source: Internet
Author: User
Tags mysql client

September 27, 2017 install and configure MySQL

1. Download mysql (i download version mysql-5.7.19-winx64)

Installation path is D:\mysql-5.7.19-winx64

2. Generate the MySQL configuration file My.ini

Placement Path is D:\mysql-5.7.19-winx64

3.my.ini configuration information

/******/

[MySQL]

# Set the MySQL client default character set
Default-character-set=utf8
[Mysqld]
# Skip_grant_tables This statement can enter MySQL without a password
#设置3306端口
Port = 3306
# set up the MySQL installation directory
Basedir=d:\mysql-5.7.19-winx64
# set up the data storage directory for MySQL database, see 6
Datadir=d:\mysql\data
# Maximum number of connections allowed
max_connections=200
# The character set used by the service side defaults to the 8-bit encoded latin1 character set
Character-set-server=utf8
# The default storage engine that will be used when creating a new table
Default-storage-engine=innodb

/****/

4. Configure Environment variables

Add D:\mysql-5.7.19-winx64\bin in Path

5. Related command cmd

. net stop MySQL shutdown MySQL service

5.2 net start MySQL open MySQL service

5.3 mysqld install add MySQL service

5.4 mysql-u root-p root login mysql (enter password after login)

5.5 mysqld--initialize Initialize MySQL database, log configuration

5.6 Use MySQL to open MySQL database

6. Configure MySQL database, log and other storage locations

Enter Mysqld--initialize (see 5.5)

7. Problems occurred

7.1 MySQL Access denied for user [email protected] error resolution

Error code 1045 username and password do not match, modify root corresponding password field can be

The corresponding important fields in the MySQL database are as follows

  

The authentication_string corresponds to the password.

*81f5e21e35407d884a6cd4a731aebfb6af209e1b corresponding Password root

Change password, command as follows

UPDATE USER SET authentication_string=password (' root ') WHERE user= ' root ' and HOST = ' localhost ';

MySQL first installation and problem solving

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.