Trang

15 thg 10, 2008

Reset MySQL root Password

  1. Stop mysqld and restart it with:
    # service mysqld stop
    # mysqld_safe --skip-grant-tables --user=root
  2. Connect to the mysqld server with this command:
    sql> mysql -u root
  3. Issue the following statements in the mysql client:
    mysql> UPDATE mysql.user SET Password=PASSWORD('newpassword') WHERE User='root';
    mysql> FLUSH PRIVILEGES;

Không có nhận xét nào:

Đăng nhận xét