Mysql5.7.21 installation and configuration tutorial,

Source: Internet
Author: User

Mysql5.7.21 installation and configuration tutorial,

Simple installation and configuration of mysql5.7.21 are as follows:

1. Install MySQL

1. Download community edition from the official website

2. Extract To drive C: \ mysql-5.7.21-winx64

3. Run the command line as administrator and enter the directory C: \ mysql-5.7.21-winx64 \ bin

4. register the service: C: \ mysql-5.7.21-winx64 \ bin> mysqld install mysql5.7.21

5. initialize the database: C: \ mysql-5.7.21-winx64 \ bin> mysqld -- initialize

6. start Database: C: \ mysql-5.7.21-winx64 \ bin> net start mysql5.7.21

7. log on to the database: C: \ mysql-5.7.21-winx64 \ bin> mysql-u root-p

Note that the logon password is in the mysql installation directory *. find in the err file, for example, the red character 2018-01-17T09: 26: 11.260249Z 1 [Note] A temporary password is generated for root @ localhost: _ = (H ,? PX.7yZ

8. Modify the root user password: C: \ mysql-5.7.21-winx64 \ bin> mysqladmin-uroot-p _ = (H ,? PX.7yZ password 1234

Ii. MySQL Configuration

1. Create C: \ mysql-5.7.21-winx64 \ my. ini, the file content is as follows:

[Mysqld] # Set port 3306 port = 3306 # Set mysql installation directory basedir = C: \ mysql-5.7.21-winx64 # Set the mysql database data storage directory datadir = C: \ mysql-5.7.21-winx64 \ data # maximum number of connections allowed max_connections = 200 # the character set used by the server defaults to an 8-bit latin1 character set character-set-server = utf8 # The default storage that will be used when creating a new table engine default-storage-engine = INNODB # Set to strict mode SQL _mode = NO_ENGINE_SUBSTITUTION, STRICT_TRANS_TABLES [mysql] # set the default character set of the mysql client default-character-set = utf8

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

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.