Today, we're installing MYSQL After that, we need to modify root password, However, such a mistake is encountered :

Access denied for user 'root'@'localhost' (using password:YES)

Later I searched the Internet , Find the following solution , Test available .

# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit

# /etc/init.d/mysql restart
# mysql -uroot -p
Enter password: < Enter the new password newpassword>

MYSQL change root password When I met Access Denied More related articles on the solution of

  1. Use tortoisegit Tools git Pull the address with the number and password , And reset the password after using this method git remote: HTTP Basic: Access denied Error resolution

    1. Pulling git You can directly specify the number in the address, and you can pull down the password as follows https://username:password@github.com   We need to pay attention to , Because the address is resolved with @ Symbols as address letters ...

  2. git remote: HTTP Basic: Access denied Error resolution

    Problem description : git push newspaper HTTP Basic: Access denied error reason : Local git Configured user name . Password and gitlabs The user name registered on . Password inconsistency . Solution : 1. If the account number is secret ...

  3. putty Login appears access denied Solutions for

    [ turn ]https://www.aliyun.com/jiaocheng/152659.html stay /etc/ssh/sshd_config There was a PermitRootLogin, Change to “Permit ...

  4. 【 Reprint 】 stay MySQL Appears at login Access denied for user &#39;root&#39;@&#39;localhost&#39; (using password: YES) Access denied , And can be modified MySQL password

    stay MySQL Appears at login Access denied for user 'root'@'localhost' (using password: YES) Access denied , And can be modified MySQL password 2018 year 08 month ...

  5. mysql change root password

    mysql change root password , There are many kinds of , There are also many records on the Internet , It's just a record , We can see it later , Just record two common methods . 1. Modified table method , Log in to the database , Switch to :mysql database ,update user set ...

  6. mysql forget root password

    http://www.rackspace.com/knowledge_center/article/mysql-resetting-a-lost-mysql-root-password MySQL - ...

  7. Mysql Of Root The code forgot , View or modify the solution

    Mysql Of Root The code forgot , View or modify the solution :1. Start the command line first 2. Run on the command line :taskkill /f /im mysqld-nt.exe3. Continue running on the command line :mysqld-nt --skip ...

  8. MySQL: Starting MySQL….. ERROR! The server quit without updating PID file terms of settlement

    MySQL: Starting MySQL….. ERROR! The server quit without updating PID file terms of settlement 1 problem [root@localhost m ...

  9. return xml If it is too long, it will be rejected nginx The solution to truncation

    return xml If it is too long, it will be rejected nginx The solution to truncation Problem description : Get data from the web , The data format is xml. When xml It's a short time , Data can be obtained normally . however xml If the length is too long, the data cannot be obtained normally , By observing the source code of the returned data , Find out xml ...

Random recommendation

  1. C# in DataTable Medium Compute Method use collection

    original text : C# in DataTable Medium Compute Method use collection Compute There are only two arguments to the function :Expression, and Filter. Expresstion It's a computational expression , About Expression Details of ...

  2. turn @html.ActionLink Several parameter formats of

    One Html.ActionLink("linkText","actionName") The first parameter of the overload is the text to be displayed for the link , The second parameter is the method of the corresponding controller , ...

  3. Logspout install 、 Use

    Docker There is no way to manage in Docker The log generated by the program running in the container .Logspout It's a Docker Containers , Size only 14MB, Use BusyBox As its core , It can send logs from container applications to ...

  4. HDU 4786 Fibonacci Tree

    Fibonacci Tree Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) P ...

  5. l​i​n​u​x add to ​ repair ​ Change ​ use ​ Household ​ name ​ The secret ​ code

    language Law : useradd [-mMnr][-c < remarks >][-d < Log in to the directory >][-e < Term of validity >][-f < Buffer days >][-g < group > ...

  6. Analyze in simple terms C# Function of interface

    1.C# Function of interface  :C# Interface is a way for many beginners to learn C# Something that people are easily confused about , It seems very easy to use , Defining interfaces , It contains methods , But there's no way to actually implement the code , Then, in the class that inherits the interface, you need to implement all the methods of the interface , But I didn't really recognize it ...

  7. SecureCRT How to set character encoding and appearance ?

    SecureCRT yes SSH It's a great tool , But when it's used , I'm used to my style . How to set it ? Options -> Conversation options -> appearance As shown in the figure below

  8. Ali I started playing too

    http://blog.alipay.com/ View the source code

  9. 201521123065《java Programming 》 The first 12 Weekly learning summary

    1. This week's learning summary 1.1 In the way you like ( Mind mapping or something ) Summarize the multi stream and file related content . 1. Division of flow : Input stream : Byte stream (InputStream). Character stream (reader): Output stream : Byte stream (Output ...

  10. 《android Exploration of development Art 》 Reading notes ( 6、 ... and )--Drawable

    Next chapter <android Exploration of development Art > Reading notes ( 5、 ... and )--RemoteViews [BitmapDrawable] Simple pictures <!xml version="1.0" ...