Friday, May 9, 2008

Connect to a MySQL server using the mysql command

To connect to the MySQL server on the local system, issue the following command:

mysql -u username -p
Enter password: *******

If the MySQL server resides on a remote host, the mysql command, if present on the local system, can be used to connect to the MySQL server accross the network. To connect to a MySQL server on a host named 'elephant' use the following command:

mysql -h elephant -u username -p


No comments:

Post a Comment