Mehrere Möglichkeiten, das Passwort von MySQL zu ändern

1: excute command SET PASSWORD

MySQL -u root

MySQL> PASSWORT FÜR ‘root’@’localhost SETZEN’ = PASSWORT("neuer Pass");

 

2:mysqladmin

mysqladmin -u root password “neuerpass”

You can excute the following command if root password had been set.

mysqladmin -u root password oldpass “neuerpass”

 

3: UPDATE user table

mysql -u root

MySQL> benutze MySQL;

MySQL> UPDATE user SET Password = PASSWORD("neuer Pass") WHERE user = ‘root’;

MySQL> FLUSH PRIVILEGES;

 

You can also take the following action if root password lost.

mysqld_safe –Skip-Grant-Tabellen&

mysql -u root mysql

MySQL> UPDATE user SET password=PASSWORD(“new password”) WHERE user=’root’;

MySQL> FLUSH PRIVILEGES;

Hinterlasse eine Antwort