Posts Tagged ‘password’
Recover MySQL database root password
Sometimes you couls have to recover MySQL database server password.
You could do it follow these easy steps :
1: Stop the MySQL server process.
/etc/init.d/mysql stop
2: Start the MySQL (mysqld) server/daemon process with the –skip-grant-tables option so that it will not prompt for password
mysqld_safe –skip-grant-tables &
3: Connect to mysql server as the root user
mysql -u root
4: Setup new root password
mysql> use mysql;
mysql> update user set password=PASSWORD(”NEW-ROOT-PASSWORD“) where User=’root’;
mysql> flush privileges;
mysql> quit
5: Exit and restart MySQL server
/etc/init.d/mysql stop
6: Start MySQL server and test it
/etc/init.d/mysql start
mysql -u root -p
Hope this help
Bye
Riccardo
Sometimes you could have to recover the password for the user root on a linux systems.
To do it, follow these simple step :
1) Reboot your system.
2) When GRUB comes up type e .
3) Now select entry that begins with kernel.
4) Add then end of the kernel entry type either s or single or 1, now hit enter.
5) Type b, the box will boot up and now you can type in the cmd prompt “passwd root”.
This will reset the password to whatever you like.
If you can’t login with your new password, probably you have problems with the root account, as for example, expired account or similar.
To fix it, do again step from 1 to 5, but at the prompt use the command “chage -l root” to see the root account status.
In case of problems, use “chage” to fix it.
Hope this help
Bye
Riccardo























