faqts : Computers : Databases : MySQL : Installation and Setup : Security

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

24 of 42 people (57%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

I have access to the user table, how can I reset a forgotten root password?
How can I reset MySQL permissions?

May 24th, 2000 12:42
Erik Johansson, Nathan Wallace, Matt Wagner


Please read section 20.10 of the MySQL manual:
    http://www.mysql.com/Manual_chapter/manual_Problems.html#Resetting_permissions
If you have privileges to update user column you should run this from
within MySQL:
   update table user set password=password('something') where user='root'
and then from the command line do this:
  mysqladmin flush-privileges
You need to run flush-privileges from the command line, otherwise the
changed privileges have not taken effect.