Installing MySQL and the pits encountered

Source: Internet
Author: User

1)mysql download

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

2) all the way next installation, after installing the file directory as follows (excluding Data folder, My.ini file)

3) new file My.ini, note that the format is ANSI, the contents of the file are as follows:

[MySQL]
# Set the MySQL client default character set
#default-set-server=utf8
[Mysqld]
#设置3306端口
Port = 3306
# set up the MySQL installation directory
basedir=d:\mysql\mysqlserver5.7
# Set up a storage directory for MySQL database data
Datadir=d:\mysql\mysqlserver5.7\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
#skip-grant-tables

#注: Basedir, DataDir change to their own installation path

4) Installation Services

Open CMD window as Administrator, CD to the bin directory of the MySQL installation path

Input command: Mysqld-install

5)Add a sentence at the end of the My.ini file: Skip-grant-tables, save

6) Open CMD window, CD to MySQL installation path in bin directory

Start service: net start MySQL

Login: Mysql-u root-p return and return

To modify the password execution statement:

Use MySQL

  updatemysql.user set authentication_string=PASSWORD(‘password‘) whereUser=‘root‘;

7) Close service: net stop MySQL, delete my.ini skip-grant-tables statement

8) start the service: net start MySQL login: mysql-u-root-p Enter the password just entered, login success

1. Startup failure after installation

Error Cause: My.ini file format is incorrect

Correct format: ANSI

2. Change root password, failed

Error reason: There is a problem with the statement

正确语句:updatemysql.user set authentication_string=PASSWORD(‘password‘) whereUser=‘root‘;

Installing MySQL and the pits encountered

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.