MYSQL root password reset

Man iš bandytų būdų suveikė, toks atvejis, nors rašoma, kad tai nėra labai saugu 🙂
sustabdom mysql – ubuntu, debian atveju: 
shell> /etc/init.d/mysql stop
tada užkuriam vėl mysql panaudodami komanda:
shell> mysqld_safe --skip-grant-tables -u root &
pasijungiam į mysql:
shell> mysql -u root
pakeičiam root passwordą:
shell> UPDATE mysql.user SET Password=PASSWORD('newpasswd') WHERE User='root';
parefrešinam privilegijas:
shell> FLUSH PRIVILEGES;
išeinam iš mysql:
shell> quit
perkraunam mysql
shell> /etc/init.d/mysql restart
Naudojausi B.1.4.1. How to Reset the Root Password pagalba =]

[GLL]Zapatdlo Written by:

Be First to Comment

Leave a Reply

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