mysql-Configuring environment variables and changing passwords (with-mysql installation tutorial)

Source: Internet
Author: User
Tags mysql tutorial mysql command line

mysql-Configuring environment variables and Change Password

First,   Flash Back Issues

1.1. No environment variables are configured

For example:

      

1.2. Enter directly without entering a password

Enter the password step directly in.

1.3. MySQL service not started

      

Second,  Configuring environment variables

2.1. Benefits of Configuring the environment

a) If no environment is configured : Enter Mysql-u root-p error

Enter the command CD C:\Program files\mysql\mysql Server 5.7\bin (my MySQL path, specific path to see your own installation path)

Jump to startup path, start MySQL

      

b) When environment variables are configured:

Direct input at command line input: Mysql-u root-p

Re-enter the password

      

2.2. Configuring environment Variables

Follow the picture step by step:

      

      

      

After you find the environment variable, select New,

      

variable = mysql_home

Value = C:\Program files\mysql\mysql Server 5.7\bin (filled in according to your own installation directory)

      

Find path, insert in value;%mysql_home%\bin

Do not forget that there is a semicolon before the percent sign ";" Note The English format input

Third,   Change Password

3.1. know the password case

1) Enter MySQL as in 2.1, then use MySQL;

2) then enter:

Update Mysql.user set Password=password (' New password ') where user= "root" and host= "localhost";

Pay special attention to the new version of MySQL (5.7) password changed to authentication_string (authentication string)

So you should enter:

Update Mysql.user set Authentication_string=password (' New password ') where user= "root" and host= "localhost";

3.2. without knowing the password

1. Stop the Service

2, Bin/mysald–skip-grant-tables

3, through the MySQL command Line window, do not need any password, directly enter into

A) according to 3.1.2)

b) flush privileges;

  Third, PostScript

1, before the online search for these problems, always a lot of search, and quite scattered, always to make a long time, simply clean up their own.

2, reprint please specify the source address: http://www.cnblogs.com/lrj1009IRET/p/8520892.html

3, as for the installation of MySQL tutorial, please select the network disk link: HTTPS://PAN.BAIDU.COM/S/1N8A94VTQJQQSFVCPOK6VVW

4, there are insufficient places to welcome the message points out, like the point of recommendation, thank you!

mysql-Configuring environment variables and changing passwords (with-mysql installation 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.