
Where nameOfYourDB is the name of the database you wish to connect to and use. For this, you can make the use of the following command – The next step is to specify the name of the database you wish to use that is present on your MySQL database server. In either of the case, that is local or remote machine server location, once you see the following output MySQL client starts. Where -h stands for host address that in my case is _ and educba is the username using which we wish to log in to the system.

In case, you want to access the MySQL database server that is located remotely on some different machine in the network then you will need to specify some additional parameters in the above query as follows –

The educba is our username, so we have used it in my command. u stands for specifying that you are mentioning the username in the further parameter value and -p stand for specifying that you will enter the password. Where you will be further prompted for entering your password. In case, if you want to login using ceratin username and password and mention them, then you can make the use of the following command provided you are present in the directory where MySQL is installed – Beginning the Client usageįirstly, open the terminal or command prompt and then navigate to the path where your MySQL client program is located and then you will be entered to MySQL client automatically if no username and password credentials are required. The reason when you might fail to locate the MySQL client program is either the program is not installed on your machine or installed on a different path or you don’t have the database administrator rights.

By default for Unix/Linux machines its usually /usr/local/MySQL/bin while for windows machine the default location is c: Program and then further your MySQL folder where bin folder must be present. There are certain steps that you need to follow to use MySQL client that are listed below – Locate the presence of Mysql client on your machineįirstly, you need to know where your MySQL client is present on your machine. We can install the MySQL client software on the remote machine and communicate with your MySQL server from anywhere using it.

It is not always necessary to use the MySQL client on the same machine where your server is present. This client helps to send the queries across the network to the server and also retrieve the response and display it on screen. By default, when you install MySQL, the MySQL client command-line program is also installed.
