Friday, August 10, 2012

MYSQL: Connect to mysql using command

How to connect to mysql using a command - from terminal

mysql -u <user> -p -h <host ip> -P <port> <dbname>

Example:

mysql -u root -p -h priyankgandhi.com -P 3306 testdb

No comments:

Post a Comment