hasło MySQL

Zmiana hasła root do systemu zarządzania bazami danych MySQL.


Zatrzymanie procesu:


  • # /etc/init.d/mysql stop

Ignorancja uprawnień:

  • # mysqld_safe --skip-grant-tables &

Wejście do systemu MySQL jako root (bez hasła):

  • # mysql -u root

Zmiana hasła w systemie 

  • mysql> use mysql; 
  • mysql> update user set password=PASSWORD("nowe_hasło") where user=’root’; 
  • mysql> flush privileges; 
  • mysql> quit
Uruchomienie mysql
  • #/etc/init.d/mysql restart