How to reset MySQL root user password and privileges

Problem :

I assigned a password to the root MySQL user in XAMPP some times ago. I recently tried to undo that and give it no password but it's not working.

I tried setting the password to an empty string using mysqld --skip-grant-tables and then using the mysql command line directly. It looks like it works, the root user no longer has a password, however if I login in PhpMyAdmin I cannot see any of my databases, only an "information_schema" and a "test" database. If I look at the User tab, it seems to have all the privileges though:

enter image description here

Any suggestion on how to fix this issue?

Note: I checked with the command line, all my databases and tables are still there, I just cannot see them in PHPMyAdmin.

Solution :

Try removing the anonymous user who is allowed to connect from any host. My feeling is that that row is taking precidence over the row for root when MySQL validates the login.

If you have removed that Anonymous user and the issue still occurs, try setting a password to root and the host to localhost then connect again.

Mysql Tutorials

Mysql Howto..

How to use multiple databases for one rails 3.1 app in Heroku?

How do I access an object method inside a List?

How to make mysql query from subqueries combine the 2 results in to 1 result

MYSQL & C#: How to escape the elements in a SELECT WHERE IN (…) clause?

How to increment primary key without using Auto Increment in MySql

How to use timespan in PHP?

How to search string in MySQL [closed]

How to use more than two “WHERE” clause? MYSQL ERROR

how to group mysql tables calculating the difference between each table's total traveled distance

How to order by a formula in MySQL

how to get the row sorted with title letter in mysql

How to update mysql db on session destroy

How to use an user variables in MySQL LIKE clause?

how to get the rows from mysql that is-5 or +5 then the current row?

How can I create Mirror of amazon MySQL RDS instance and connect to it?

How can I alert the user if a new line is inserted in the database

How a probably NULL-valued attribute could still reference another attribute in MySQL

How to display emaiIds with hyperlink when using php-mysql

How to do group by chunk wise in SQL?

How to bind MySQL table to datagrid in WPF app

how can I connect these two tables in sql?

MySQL - How to store inputs of unknown & varying size?

In Doctrine 2 when using Class Table Inheritance: how can one write a Native SQL Query that will return results from a child class?

how to change all table prefix in a single query

How to insert garbage characters into mysql table via JDBC

How to combine based on id in mysql

MySQL - How can I add consecutive dates to many existing records?

how to stop empty group in php using mysql

how to show the content exactly as it's saved in mysql

How to order by field if it contains number and text in mysql