Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I just setup the phpMyAdmin and I have this problem: When I login, I can't see any tables.

I had tried this with MySQLWorkbench and I got the same result.

Any suggestions ?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Running these commands are completely synonymous:

SHOW TABLES;
SELECT table_name FROM information_schema.tables where table_schema = DATABASE();

Under the hood, both of these commands will only check for the presence of .frm files in the currently selected database.

In MySQLWorkbench, you must make sure you have a Default Schema selected. Otherwise, you should not get anything back. Here is what effectively happens from the mysql client's point-of-view:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 5.5.12-log MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> select database();
+------------+
| database() |
+------------+
| NULL       |
+------------+
1 row in set (0.00 sec)

mysql> show tables;
ERROR 1046 (3D000): No database selected
mysql> SELECT table_name FROM information_schema.tables where table_schema = DATABASE();
Empty set (0.00 sec)

mysql>

Try the following in MySQLWorkbench:

  • In the main window under 'Server Administration' (to the right), click 'Manage Server Instances'
  • In the 'Server Instances' ListBox on the Left, Select a Server Instance
  • Click the 'Edit Selected...' Button
  • In the Parameters Tab, the last Edit Field is Labeled 'Default Schema:'
  • Make sure you put a Database Name in that Field. For test purposes, use 'information_schema' (preferable) or 'mysql'.

After these steps, the selected database should be visible.

Give it a Try !!!

share|improve this answer

The account that you are using to log into PHPmyAdmin/Workbench may not have permissions on the required tables. Do you see the required tables when you use the same login in the MySQL monitor console? Try logging in with a higher privileged account and viewing again.

share|improve this answer
    
Yes, I logged in as a root –  run Aug 22 '11 at 12:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.