mysql inside the CLI

Sometimes useful to access a mySQL database with the CLI.

Databases in this post: joomla or wordpress etc. on the providers host.
Or on a XAMPP.

Usually there is no need to touch the database, the application do this for you. But in case of need or if you are newsick then….

A few words about mysql databases:
– You can have one or more databases or your providers host.
– Database name is given by the provider. In my case
– Each database contains TABLEs, similar to excel
– Table names are given by the application. WordPress, Jomla or yuo.
–  Several Applications can share a database. So they will seperate their table by the TABLE_NAME_PREFIX.
Samples: jos_ j15_ j16_ wp_

Database Name, User, Password i found on my providers Web GUI

First access with putty or similar onto provides SSH shell.

Login mysql database

mysql --user=user_name --password=your_password db_name

At my provider user_name == db_name



to logoff, guit, exit, bye

Deleting Table(s)

drop table   tbl_name [, tbl_name] ...  \g

to delete one or more tables. BE CAREFUL deletion will be done after you release the enter key.