Recover MySQL root password

/etc/init.d/mysql stop
/usr/bin/mysqld_safe --skip-grant-tables --skip-networking &
mysql -u root
use mysql;
UPDATE user SET Password=PASSWORD("your password here") WHERE User="root";
exit
# kill all the mysql processes
/etc/init.d/mysql stop
# Start MySQL again
/etc/init.d/mysql start
Dette indlæg blev udgivet i Knowledge Base, Old Base, SQL. Bogmærk permalinket.

Skriv et svar