First ensure that outgoing port 3306 is open on the local server and incoming port 3306 is open on the remote server.
Then you can use the following:
mysql -h remote_IP -u remote_DB -p
If 'mysql' does not work, use the full path such as /usr/local/mysql/bin/mysql. That will change according to where your mysql is setup.
When prompted for the password, type in the password and you are in!