Reconnecting and exiting MySQL

To connect to mysql, you need to do the following.

%>mysql -u root -p

This would prompt you for your password. Type your password and hit enter. You can also type your password in the mysql command as follows, but it is not a good idea.

%>mysql -u root -pMY_password

To quit MySQL you can type any of the following commands:

mysql>\q
mysql>quit
mysql>exit