Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

10/20/2016

Show Remote MySQL Database Table List in Ubuntu

Question


I would like to know how to connect to MySQL database remotely and display the list of tables of my database. I tried doing it in my terminal through:

mysql -u USERNAME -pPASSWORD -h HOST_NAME DATABASE_NAME

and

mysql -u USERNAME -p PASSWORD -h HOST_NAME DATABASE_NAME

But nothing works, all it shows are the help options and variables.

Answer


All you need to do is use the mysqlshow instead of mysql like:

mysqlshow -u USERNAME -pPASSWORD -h HOST_NAME DATABASE_NAME

It should give you the list of table of your database like this:

Note:
 Password should be -pPASSWORD not -p PASSWORD.

Show Remote MySQL Database Table List in Ubuntu
MySQL Table list in Ubuntu terminal