How to access MySQL server from shell prompt

MySQL software includes myslq client. It is a text-based client for mysql, a SQL-based relationed database server.

syntax:

mysql -u mysql_user_name -p mysql_password -h mysql_server

-u mysql_user_name : Specify MySQL user name. User root only when connecting to local system.
-p mysql_password : Specify MySQL password , Employ the specified password when connecting to the database server. If a password is not supplied , it will be requested interactively.
-h mysql_server : Connect to the specified host remote or local server

Leave a Reply