-1

Is it possible to select all the tables from a database (not knowing their names) and displaying them? My friend has a mysql server but he doesn't have phpMyAdmin installed and he's begging me to transfer all his php-fusion accounts to his new WordPress blog. He doesn't understand a thing with mysql... Anyone got an idea?

Mr Lister
  • 45,515
  • 15
  • 108
  • 150
Aistis
  • 251
  • 1
  • 2
  • 14

1 Answers1

3

Use the SHOW and DESCRIBE statements. That's all phpMyAdmin is doing in the code. Your SQL user should have privileges.

List all tables:

SHOW tables;

List table definition:

DESCRIBE table_name;

Check out MySQL for more details.

Jason McCreary
  • 71,546
  • 23
  • 135
  • 174