Window installation MySQL Tutorial

Source: Internet
Author: User
Tags mysql tutorial

1. Download the MySQL installation package to the specified file:

For example, I extracted the contents of the downloaded MySQL zip into this file, the specific file content is as follows:

My.ini needs to create its own, the contents are as follows:

==3306sql_mode

The important point here is that you need to create my.ini; So that we have completed the first step of the foundation.

2. Start the requirement setting:

That is, it needs to be executed in the CMD command line in the MySQL directory:

Mysqld--defaults-file=my.ini--initialize-insecure
Mysqld--install

This 2-part bash language performs the basic setup.

3. Finally, start MySQL:

net start MySQL

The execution of all the base here needs to be performed under the Administrator's authority, otherwise there is no permission to execute the command.

Finally, MySQL was successfully launched.

4. Modify the MySQL root password:

Method 1: Use the Set password command
First log in to MySQL.
Format:mysql> set password for user name @localhost = password (' new password ');
Example:mysql> set password for [email protected] = password (' 123 ');

Method 2: Use Mysqladmin
Format: Mysqladmin-u username-P Old password password new password
Example: mysqladmin-uroot-p123456 password 123

Method 3: Edit the user table directly with update
First log in to MySQL.
mysql> use MySQL;
mysql> Update user set Password=password (' 123 ') where user= ' root ' and host= ' localhost ';
mysql> flush Privileges;

So basically we have successfully installed and started MySQL configuration.

Attached: You may encounter a problem:

My solution is to reinstall it, or if you haven't quit MySQL after installation:

Execute the following statement:

Mysql>update User Set host = '% ' where user = ' root ';

See this article specifically: http://www.111cn.net/database/mysql/42040.htm

Window installation MySQL Tutorial

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.