2 issues with MySQL installation

Source: Internet
Author: User
Tags new set

Problem:
1. Encountered not entering the password can be boarded, using the password error.
2. (decompression version) when the cmd input >mysql–u root–p, press ENTER to enter the password, you will be called
Enter password____, otherwise an error occurs:
ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using password:yes) or (using Password:no)

To resolve the operation:
1. We will first find the My.ini file in the installation directory.
2. Edit the My.ini file in the [Mysqld] entry below and add Skip-grant-tables, save.
3. Run cmd with administrator privileges, stop the MySQL service (the default name of the mysql57 version is not the same as some mysql56),
Input: net stop MySQL
Start again, enter net start MySQL
(The path is not configured to find the bin directory to enter)
4. Enter: Mysql–u root–p enter.
5. Enter to enter password___//At this point you can press the ENTER key directly to skip.
6. At this point we entered the MySQL database (but the permissions are very low)
Execution: Mysql>use Mysql;
7. Set a new password for the root user (the following sentence is different from some methods on the Web, note.)
Execute: Mysql>update user set Password=password (' Here is the password you want, enter the single quotation mark in English input method to enclose ') where user= ' root ';
8. Refresh the database Mysql>flush privileges;
9. Exit Mysql mysql>quit;
10. Restart the service at this point (of course, do not forget to delete the My.ini inside the Skip-grant-tables)
11. The above changes after the landing there are problems to see below.


Instance:
The red font is the statement you want to use, and the blue font you type.
mysql> use mysql;
Database changed
mysql> UPDATE user SET Password=password (' root ') where user= ' root ';
ERROR 1054 (42S22): Unknown column ' Password ' in ' Field list '
mysql> Update mysql.user set Authentication_string=password (' 123qwe ') where user=' root ' and host=' localhost ';
Query OK, 1 row affected, 1 Warning (0.00 sec)
Rows matched:1 changed:1 warnings:1

mysql> Flush privilages;
Error 1064 (42000): You have a error in your SQL syntax; Check the manual, corresponds to your
MySQL Server version for the right syntax-use near ' privilages ' on line 1
mysql> flush Privileges;
Query OK, 0 rows affected (0.01 sec)

Mysql> quit;
Bye

d:\mysql\mysql-5.7.16-winx64\bin>mysql-uroot-p123qwe; (this time the input will be an error)
MySQL: [Warning] Using a password on the command line interface can is insecure.
ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:yes)

D:\mysql\mysql-5.7.16-winx64\bin>mysql-uroot-p
Enter Password: ******
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 2
Server version:5.7.16

Copyright (c), Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of the Oracle Corporation and/or its
Affiliates. Other names trademarks of their respective
Owners.

Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.

Mysql>


If you cannot execute any statements after landing
Error:
You must reset your password using the ALTER USER statement before executing this statement.

After the installation of MySQL, after landing, regardless of running any command, always prompt the above error statement, after logging in,
Use this to execute the following statement (the red font is best for itself, because punctuation may not be the correct format)

1:set PASSWORD = PASSWORD(' Your new PASSWORD ');

2:alter USER ' root ' @ ' localhost ' PASSWORD EXPIRE never;

3:flush privileges;

Complete the above three steps to exit and re-login, using the new set of password (your new password in parentheses) is OK.

2 issues with MySQL installation

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.