Configuring MySQL Database detailed steps

Source: Internet
Author: User

First, configure the MySQL database

1, unzip the green version of MySQL, such as

Second, installation Services

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

2, run the command Mysqld–install installation services, such as:

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

3. Run the net start MySQL startup service, such as

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

Third, client testing

1, mysql–uroot–p such as

Four, the configuration code is UTF-8

1. Under the root directory of mysql5.6, copy the My-default.ini file and name it My.ini, 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

Under the [MYSQLD] node, configure the server-side encoding to add 2 items

Character_set_server=utf8

Such as:

If something similar to DEFAULT-CHARACTER-SET=GBK already exists under this tag, just modify it.

In addition, the default is no [MySQL] node, this is the configuration of the client information

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

[MySQL]

Default-character-set=utf8

Five, 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:

Vi. Modify username and password

1. Run the command

Use MySQL;

UPDATE user SET Password = Password (' 123456 ') WHERE user = ' root ';

FLUSH privileges;

Such as:

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

To the successful configuration of the MySQL database, I hope this blog post can give more friends to help! Think of the definition of a praise it.

Configuring MySQL Database detailed steps

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.