15

I create db via mysql:

CREATE DATABASE `my_db` CHARACTER SET utf8 COLLATE utf8_general_ci;

mysql>show databases - my_db is shown,

then i'm login to phpmyadmin and don't see this db, only - information_schema, phpmyadmin, test

p.s. ubuntu 12.04, mysql 5, phpmyadmin 3.4.10.1deb1

Tim Dearborn
  • 1,178
  • 7
  • 18
user123321
  • 235
  • 1
  • 2
  • 7
  • 1
    Sounds like you created the database with one user, then logged into phpMyAdmin with another user that doesn't have access to that database. Could that be the cause? – ellipse-of-uncertainty Nov 11 '12 at 05:43
  • @hyphenthis exactly, i created db via root(mysql-root), and entering phpmyadmin via default 'phpmyadmin' user! and what i need to do now? can i do something to login via user and see tables, not only via root – user123321 Nov 11 '12 at 05:46
  • Give phpAdmin rights to all of the databases that you want it to be able to view on the server. – Tim Dearborn Nov 11 '12 at 05:49

3 Answers3

33

If you Still don't see it, Try to logout from cpanel and then log in again to cPanel or PHPMyAdmin. It worked for me.

JackSparrow
  • 948
  • 1
  • 11
  • 9
15

You need to give your user access to that database, log into phpMyAdmin as the mysql administrator, go to the database in question and click on "permissions", then proceed to add your desired users to the database. Alternatively you can use the mysql client and issue the commands as SQL such as:

GRANT ALL ON db1.* TO 'finn'@'localhost';

http://dev.mysql.com/doc/refman/5.0/en/grant.html

0

Clearing the browser cache, logging out and then logging in again worked. Originally found the solution here: https://www.godaddy.com/community/cPanel-Hosting/Database-not-showing-up-in-phpmyadmin/td-p/112397

Maneet
  • 61
  • 1
  • 9
  • 1
    Reviewers: this is an actual answer. There is a post in the link backing up the statement, meaning the necessary context is included – Zoe Feb 22 '19 at 12:31