Reset MySQL pw

Hi,

I messed up my MySQL root-password. Good that there wasn't any data in the mysql-db. I tried already to reinstall MySQL but this didn't work. How do I get MySQL completly removed to set up a new password?

Regards.
 
You don;t need to remove it, just shut it down and start it with --skip-grant-tables
Code:
mysqld_safe --skip-grant-tables &
Then, login:
Code:
mysql -u root
and you will be presented with the mysql> prompt.
Change your password like so:
Code:
use mysql;
Code:
update user
set password=PASSWORD('NEWPASSWORD')
where user='root';
Code:
flush privileges;
Shut down mysql, and use the script (/usr/local/etc/rc.d/mysql-server start) to start it up again.


PS: google ;) It helps.
 
I had to
Code:
mysqld_safe --skip-grant-tables &
/usr/local/etc/rc.d/mysql-server start
to start mysql then I had access to the direct mysql-db
Thanks for the help :D
 
Back
Top