Win7_32 bit installation mysql_5.6 and password modification method

Source: Internet
Author: User

1. Download MySQL:

Http://www.xiazaiba.com/html/361.html

2. Installation

For convenience, all by default next, the principle is a sample, finally installed to:

3. Configure Environment variables

What I'm adding here is C:\Program files\mysql\mysql Server 5.6

I have joined in path here; C:\Program files\mysql\mysql Server 5.6/bin (Note semicolon!) )

4. Installation Services

Open cmd and go to C:\Program files\mysql\mysql Server 5.6/bin

Enter command: CD C:\Program files\mysql\mysql Server 5.6/bin

Input: mysqld install MySQL--defaults-file= "C:\Program files\mysql\mysql Server 5.6\my-default.ini"

Then start the service: net start MySQL

You can also open the admin tools service, find the MySQL service, open it manually (or enter by the services.msc command)

5. Configure the password

Installation completed root Account no password, you can set the steps as follows:>mysql-u Root mysql>show databases; mysql>use MySQL; mysql>update User set Password=password ("123456") WHERE user= ' root '; mysql>flush privileges; mysql>quit

Password Modification Method:

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;

Method 4: When you forget the root password, you can do this
take windows as an example:
1. Close the running MySQL service.
2. Open the DOS window and go to the Mysql\bin directory.
3. Enter Mysqld--skip-grant-tables carriage return. --skip-grant-tables means skipping permission table authentication when starting the MySQL service.
4. Open a DOS window again (because the DOS window is no longer moving), go to the Mysql\bin directory.
5. Enter MySQL return, if successful, a MySQL prompt will appear >
6. Connection rights database: use MySQL;
6. Change Password: Update user set Password=password ("123") where user= "root"; (don't forget the last semicolon)
7. Refresh permissions (required steps): Flush privileges;
8. Quit quit.
9. Log out of the system and then enter, using the username root and the new password you just set 123 to log in.

...... To the network of finishing, thank you!

Win7_32 bit installation mysql_5.6 and password modification method

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.