Ch13rY_Blogs

Dont say difficult before you try

Reset mysql root password

Ditulis oleh ch13ry di/pada Juni 18, 2008

Setelah kita mengginstall mysql via console, kita pasti akan mengcreate password sebagai security nya

untuk menjaga keamanan data2 kita. Tapi pada suatu saat ada kemungkinan kita lupa password root nya. ada kemungkinan untuk bisa me reset password root mysql nya untuk alternatif solusi terbaik…

adapun langkah langkah nya :

1. Kill the mysqld that may be running (not with -9):

kill `cat /var/lib/mysql/hostname.pid`

2. Restart MySQL in safe mode:

/usr/bin/safe_mysqld –skip-grant-tables&

3. Connect to MySQL:

/usr/bin/mysql

4. Use the mysql database:

use mysql;

5. Run the update command putting your new password where the ….’s
are. Yes this is all one command:

update user set password = password(‘…….’) where user = ‘root’ and
host=’localhost’;

6. Flush the privileges so everything will take:

flush privileges;

7. Then quit mysql:

quit

8. Stop mysql from command line with:

/etc/init.d/mysql stop

9. Restart mysql from command line with:

/etc/init.d/mysql start */

2 Tanggapan ke “Reset mysql root password”

  1. t3tuko berkata

    sip artikele bos……..
    ntar tak cobae……

  2. don berkata

    Nice info gan, kasih lagi tips-2 lain yang lebih seru.. ok!
    __________________________
    Image drive

Tinggalkan Balasan

XHTML: Anda dapat gunakan tag ini: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>