1

I don't know mysql at all. But yesterday while using drupal I couldn't access to the login page somehow I accessed login page. But before I found a solution, I thought some database problem and opened phpmyadmin and my bad luck went to previlages and unchecked to grant of root, and later I found some error in my website and consult to my seniors and talked about it but they, there is no way to access or create new user for database.

I thought that previlage for drupal database, but huh my bad it's whole database previlage.

When I again tried to check that it says:

Access denied for user 'root'@'localhost' (using password: NO)

Can I restore the state that of checked to grant anyway something by restoring the OS or any idea?

enter image description here

Navin Rauniyar
  • 10,127
  • 14
  • 45
  • 68
  • Check this: http://stackoverflow.com/questions/1709078/how-can-i-restore-the-mysql-root-users-full-privileges – Sal00m May 07 '14 at 11:36
  • I checked that and they also need root user grant access then only they can modify othe... – Navin Rauniyar May 07 '14 at 11:37
  • Nope, they say that you need to restart with `--skip-grant-tables` then check the permission again and restart server – Sal00m May 07 '14 at 11:39

1 Answers1

0

See

http://dev.mysql.com/doc/refman/5.6/en/resetting-permissions.html

And in particular

http://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_skip-grant-tables

Not tested, but I think this should work:

  • Stop the server
  • Start the server again with --skip-grant-tables
  • Check the missing check mark
  • Stop the server
  • Restart the server normally

Don't forget to actually stop and restart the server at the end, or you will have no security at all.

Marc Alff
  • 8,227
  • 33
  • 59