logo logo

Reset root mysql from console

Huft, finally i am landing here again 😀

This is “sepele” but sometimes when i need, i am must be more think to use this guides, for my guides i am write here for my self and other, if someone need this guides.

1. Login to your server and become the God

user@server$ sudo
Password:
root@server#

2. Stop mysql service

root@server# /etc/init.d/mysql stop


3. Start mysql service using –skip-grant-tables

root@server# /usr/sbin/mysqld --skip-grant-tables --skip-networking &

4. On mode demon, start mysql

mysql -u root

5. Reset privileges and reset your mysql root password

mysql>FLUSH PRIVILEGES;
mysql>USE mysql;
mysql>UPDATE user SET Password = PASSWORD('new_password') WHERE Host = 'localhost' AND User = 'root';

6. For the last, reset privileges and start normal mysql service

mysql>FLUSH PRIVILEGES;
mysql>exit;
Bye
root@server# /etc/init.d/mysql start

Done !

bottom

4 Responses to “Reset root mysql from console”

  1. Hari ini saya telah banyak membaca artikel yang anda terbitkan dan
    Setelah membaca artikel di atas saya jadi paham dan pengetahuan saya pun jadi bertambah

  2. Hari ini saya telah banyak membaca artikel yang anda terbitkan dan
    Setelah membaca artikel di atas saya jadi paham dan pengetahuan saya pun jadi bertambah
    http://www.anchorwatch.com/2014/04/the-term-descent-in-canary-bird.html

  3. anis merah says:

    webs yang memberikan wawasan ,ilmu,pengetahuan agar penerus bangsa semakin pintar

  4. mantap gan infonya,, terima kasih banyak,,

Leave a Reply

Your email address will not be published. Required fields are marked *

 

bottom