Jules Harrison
Jules Harrison

Reputation: 31

phpMyAdmin and mysql not showing the same users or databases

You will have to excuse me as I am new to the world of PHP and Mysql.

I have setup PHP, Mysql and Apache (using MAMP to connect on a localhost) which I managed by using a tutorial and everything seems fine... I am logging into mysql as the root user with full privileges granted and I am able to create databases in mysql and view them by using SHOW DATABASES; so far so good !

...However...

When I access phpMyAdmin and go to the databases section, there are no databases which I have created in mysql, even though phpMyAdmin shows the Database server as User:root@localhost which is the same user I am accessing mysql with.

This situation is also the same when reversed, I can create a database as the root user in phpMyAdmin but the database will not show in mysql when I am logged in as root user and use SHOW DATABASES;

I am figuring this probably just has something very to do with my lack of understanding and I apologise if this is a very basic question but any help would be greatly appreciated.

Thank you

Upvotes: 1

Views: 1161

Answers (2)

Senthil
Senthil

Reputation: 2246

Better stop MAMP and access the Mysql using command prompt mysql -u -P -p password

Upvotes: 1

Danny Omega
Danny Omega

Reputation: 11

Make sure you are logging into phpMyAdmin from your browser and that both are pointing to the same host, ie. no not a virtual host, you MySQL might be on virtual and phpMyAdmin on localhost etc.

Upvotes: 1

Related Questions