Recreate the mysql Database
I've dropped the entire mysql database, which holds all the privileges I need to login.
- Stop mysqld and restart it with the
--skip-grant-tables --user=rootoptions (Windows users omit the
- Recreate the mysql database. If you have a backup, use that. Otherwise, issue
CREATE DATABASE mysql;and then run the SQL file below that is appropriate for your version:
- Stop mysqld and restart it as normal. You should now be able to login as root with a blank password.