Home » , » Resetting your mysql root password

Resetting your mysql root password

Written By Unknown on Selasa, 13 Desember 2011 | 09.17



It is quite frequent that an administrator simply forgets his mysql's root password.
Luckily, it is quiet easy to reset it, here are the steps:


  1. SSH as root to your machine
  2. Turn off the mysqld daemon if running
    • RedHat/Fedora users can do so by executing:  service mysqld stop
  3. Run safe_mysqld by executing:
    • safe_mysqld --skip-grant-tables
      (this will run allow you to connect without a password)
  4. Open a second shell / SSH again and execute:
    • mysql mysql
      (to directly connect and select the mysql database which contains the user authentication data)
  5. On the mysql prompt, execute:
    • update user set password=password('newpassword') where user='root';
      where newpassword is your newly chosen password.
  6. That's it! close everything and start your mysql daemon again:
    • service mysqld start

Share this article :

Posting Komentar

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Kumpulan Kata Broadcast Blackberry - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger