I want to create simple tables, insert values in it, and do queries. How to perform them in the terminal?
You make a database by typing
In the prompt you enter, you then start by creating your database (as explained by onik in the comments):
Once you have made that database, you can experiment with it. You can simply type
As described in Sauruv's answer you can also connect to the database as follows (without the space between p and your password or better, just do not use the -p option and you will get a password prompt [credits go to onik]):
Here is the syntax to execute sql statement from terminal
I'm assuming that you are using
And of-course you can create a database using terminal itself
Hope it helps you.. Reply if you need further assistance..