japheth
japheth

Reputation: 473

My databases are not visible on phpMyAdmin but available in the data folder in mysql

I have several databases in my localhost. Recently, I noticed that the root user didn't have a password yet I had set it before and used to be working. On opening the phpMyAdmin, I got access denied but after changing the settings to remove the password, I was able to access it. However, I now realize that all my databases are not available apart from the default xampp databases yet when I check from C:\xampp\mysql\data folder, all the database folders are there together with data. When I try to create a database that I know exists, it is created without popping any duplicate error. What could be happening with my localhost server?

UPDATE

I found out where the problem is and why the databases are not visible. First, the file location changed from C:\xampp\mysql\data to C:MySql5\Data. I guess there must have been an update without my knowledge. I have however tried to copy one of the database files to the new file location but I am getting an error of table.menu doesn't exist for a table that I want to view its properties. Could this be a new change to the MySQL? I have checked MySQL version that I am running is 5.5.15

Upvotes: 0

Views: 3113

Answers (1)

Danyal Sandeelo
Danyal Sandeelo

Reputation: 12391

Try

grant all on *.* to root@'localhost';
flush privileges;

and this too

grant all on *.* to root@'127.0.0.1';
flush privileges;

The query will assign all privileges to root user on all databases. You would be able to view databases then.

Upvotes: 1

Related Questions