Mysql Reset heslo na roota
Často-krát sa stane, že zabudmene helso na roota, nie je to však žiaden problém tá sa rýchlo resetnuť.
Postup zmeny hesla
- vypneme MySql deamona
- reset hesla
- restartneme databázi
1. Vypneme MySql deamona
[root@example.cz ~]# /etc/init.d/mysqld stop
alebo :)
[root@example.cz ~]# killall mysqld
2. Resetneme heslo
[root@example.cz ~]# /usr/libexec/mysqld --skip-grant-tables --user=root
[root@example.cz ~]# mysql -uroot
mysql> UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> exit;
3. Restartneme databazi
[root@example.cz ~]# /etc/init.d/mysqld restart