Linux user to quickly reset the MySQL (root) password method

2011-05-24  来源:本站原创  分类:OS  人气:81 

Reset the root password for MYSQL methods:

1. Stop the running MySQL processes

killall-TERM mysqld

2. To start in Safe mode MySQL <! - IWMS_AD_BEGIN ->

<script src="http://www.linuxidc.com/system/system60.js" type="text/javascript"> </ script>

<! - IWMS_AD_END ->
mysqld_safe-skip-grant-tables &

3. Landing MYSQL, after completion of the above two steps can not have a password to access the MySQL

mysql-u root

4. Change your password, this we can in the mysql client prompt the user to directly modify the information table

use mysql;

select host, user, password from user;

update user set password = password ("new password") where user = "root"

flush privileges;

The first sentence: Open System database "mysql"

Second sentence: a look at the current user information table which users can access data from which host

Third sentence: directly modify the user password, the fourth sentence is to update the user rights to take effect immediately

5. Exit the console, start the service

killall-TERM mysqld

service mysqld start

Through this method I successfully reset the root password for MYSQL

相关文章
  • Linux user to quickly reset the MySQL (root) password method 2011-05-24

    Reset the root password for MYSQL methods: 1. Stop the running MySQL processes killall-TERM mysqld 2. To start in Safe mode MySQL <! - IWMS_AD_BEGIN -> <script src="http://www.linuxidc.com/system/system60.js" type="text/javascript&

  • Forget to reset the MySQL root password to modify 2011-10-18

    Reference: http://www.linuxidc.com/Linux/2008-02/11137.htm

  • [Reserved] setting. Modification. Mysql root password reset 2010-03-16

    Set, modify, reset mysql root password Overview: This article describes how to set up, modify, reset (if you do not care forget root password) mysql root password, and often I use the mysqladmin command, often appear similar to the following informat

  • MYSQL root password reset 2011-05-19

    Method One: MySQL provides access control to skip the command line parameters through the command line as a command to start MySQL server: safe_mysqld - skip-grant-tables & You can skip the MySQL access control, anyone can in the console as the admin

  • Linux to quickly reset the MySQL user (root) password method 2011-05-24

    Method One: The easiest way is installing mysql, the system prompts the method. Use mysqladmin to complete. shell> mysqladmin-u root password "newpwd" shell> mysqladmin-u root-h host_name password "newpwd" password behind the dou

  • MySQL root password reset three-step 2010-10-24

    If you forget the MySQL (and PHP with the best combination) ROOT password for MySQL (and PHP with the best combination) cause great inconvenience to use, but few friends would MySQL ROOT password reset, then complain ah, I have a deep feeling, close-

  • Mysql root password forgotten how to reset the root password 2010-09-02

    Mysql root password forgotten how to reset the root password Introduce a very useful mysql startup parameter - - skip-grant-tables. As the name suggests, is to start mysql does not start grant-tables, authorization form. What's the use? Of course, fo

  • MySQL root password to reset the three-step 2010-10-24

    If you forget to MySQL (and PHP with the best combination) ROOT password for MySQL (and PHP with the best combination) use causes great inconvenience, but few friends, will MySQL ROOT password reset, then complain ah, I have deep feelings, close-up a

  • Changes on the mysql root password under linux problems encountered 2010-08-03

    Changes on the mysql root password under linux processes, can be found online a lot, probably is: # Killall mysqld / / interrupt the process currently running mysql # Mysqld_safe - skip-grant-tables & / / start in Safe Mode # Mysql / / no direct acce

  • Ubuntu reset MySQL root password under the (transfer) 2010-12-28

    Learning ubuntu, install mysql root password after accidentally changed the password of non-normal by the following method to reset root password: mysql-server 5.1 version, as follows: 1.sudo vim / etc / mysql / my.cnf, in the [mysqld] section add th

  • Ubuntu to reset MySQL root password (rpm) 2010-12-28

    Learning ubuntu, install mysql root password after accidentally changed the password for non-normal by the following method to reset the root password: mysql-server 5.1 version, as follows: 1.sudo vim / etc / mysql / my.cnf, in the [mysqld] section a

  • mysql root password forget how to do 2011-09-21

    Turn http://zhaoshg.iteye.com/blog/380521 Forget MySQL ROOT password in MySQL using a very common problem, but have many friends and will not reset ROOT password, and what is much suffering, I have deep feelings, close-up and to share this article: 1

  • mysql root password forgotten solution and restart 2011-01-23

    One. MySQL password recovery methods if you have forgotten MySQL root password, you can reset the following ways: 1. KILL off system in the MySQL process; killall -TERM mysqld 2 with the following command to start MySQL, do not check the permissions

  • How to change mysql root password? 2011-05-11

    If you forget your mysql root password, do not worry, you only need four steps will be able to solve the problem! -------------------------------------------------- -------------------------------------------------- ----------------------------- Spec

  • Windews mysql root password is lost the next steps to solve 2011-05-22

    [Size = medium;] Mysql root password is lost troubleshooting steps: 1, stop mysql service (as an administrator, run the cmd command line) net stop mysql 2, into the install mysql bin directory, execute mysqld - skip-grant-tables 3, open a new cmd win

  • Forget MySQL Root Password 2011-09-15

    Forget MySQL Root Password 1. Stop the mysql service > / Etc / init.d / mysql stop 2. Start the server without password > Mysqld_safe - skip-grant-tables & 3. Connect to the mysql server > Mysql-u root 4. Setup new MYSQL root user password &g

  • forgot mysql root password linux solution 2010-07-02

    As follows: 1, close the mysql service / etc / init.d / mysqld stop 2, using the-skip-grant-tables option to start the MySQL service, you can modify / etc / inin.d / mysqld script to start the position to increase this option, vi / etc / init.d / mys

  • linux system to modify the mysql database root password method 2011-05-12

    The first method: / Local / server / mysql / bin / mysqladmin-u root password 'new_password' As the mysql installation time, there is no default root password, use this installation method to set the root password. [Root @ uc ~] # / local / server /

  • How to modify the mysql root password? 2010-03-23

    Forget MySQL (and PHP with the best combination) ROOT password in MySQL (and PHP with the best combination) using a very common problem, but have many friends and will not reset ROOT password, and what is damned hard, I have emotionally, features to

  • super administrator under windows mysql root password forgotten solution 2010-03-09

    Reprinted from: http://www.kuqin.com/database/20080306/4249.html Today to help a friend retrieve a MYSQL ROOT super administrator password, enter the command when starting a small punched a "point" harm's tossing a few hours, finally resolved, w