2. Configure MySQL Database

Source: Internet
Author: User

First, step:

1, unzip the green version of MySQL, and renamed to mysql5.7, such as

Compare to Previous versions of 5.6, less data directory ( storage ) and My-default.ini file (configuration information)

Second, installation Services

1, run cmd (Administrator version, otherwise no permissions), such as

for the new mysql5.7 no more. Data directory, we need to run the command to create

2. To the bin directory of MySQL source file, lay mysqld--initialize-insecure--user=mysql, create data directory

3, run the command Mysqld–install installation Services, such as:

If you don't need MySQL, just run mysqld–remove to remove it, such as

4 , run the net start MySQL startup service, such as

Note:

If you need to configure whether booting up MySQL can be configured within the Windows service.

Click on the ' This computer ' right button and click Manage

Find the service, click Go to find MySQL, you can change the status

Third, client testing

1,mysql–uroot–p such as

Iv. Modify username and password

1. Run the command

Use MySQL;

UPDATE user SET Authentication_string=password (' 123456 ') where user= ' root ';

Flush privileges;//Refresh

Such as:

2, re-login, Run command mysql-uroot-p123456

Five , the configuration code is UTF-8

1. View the default encoding

2, in the root directory of the mysql5.7, create a new My.ini file, (5.7 After this file, own new), such as:

When the Mysql service program starts, it automatically reads the my.ini to get the configuration parameters, including the encoding

2. Edit My.ini

in the [Mysqld] node, configure the service-side encoding, add 2 Item Content

Character_set_server=utf8

[MySQL] node, this is the configuration of the client information

We also add [MySQL] node, and configure the encoding UTF8

[MySQL]

Default-character-set=utf8

Such as:

Six, test query

1, modify the configuration file must first restart the service

2, the normal use of the root User login

3. Run command show variables like "%character%" to View system character set variables such as:

2. Configure MySQL Database

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.