Sunday, January 15, 2017

Accessing MYSQL through terminal

To access mysql from CLI:
 mysql -u <username> -p<password> <database_name>
Make sure no space between -p and password. Of course, this password will be visible in history.
To overcome this:
  1. Leave it blank and it will ask you for it.
  2. start the command with a space in front of mysql