MYSQL Server Connection

MYSQL Connection To Server

Host, user and password parameters are needed to connect the mysql server. We have to connect server like this
shell>mysql -h host -u user -p
Enter Password: *******
host - Where MYSQL server is running user - username of MYSQL server password - password of MYSQL server When server is connected, it show like this message
shell> mysql -h host -u user -p
Enter password: ********
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 25338 to server version: 5.6.13-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

When server is not connected, it show like this message
 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' 

MYSQL Disconnect From Server

To disconnect the server, use the "QUIT" command at mysql prompt