MySQL is an interactive program that allows you to connect to a MySQL server, run queries, and view the results. To connect to the server, you'll need to provide a MySQL user name when you invoke mysql and a password.
You should be able to connect like this:
Note:If the server runs on a machine other than the one where you log in, you'll also need to specify a hostname.
The ******** represents your password; enter it when mysql displays the Enter password: prompt.
If that works, you should see some introductory information followed by a mysql> prompt:
The prompt tells you that mysql is ready for you to enter commands.
After you have connected successfully, you can disconnect any time by typing QUIT at the mysql> prompt:
mysql> QUIT
Bye
You can also disconnect by pressing Control-D.