Connecting to MySql using terminal utility UNIX / Mac OS


how can I connect to MySql database located for example on with terminal utility?


$ mysql --host=<hostname> --user=<user> -p <databasename>

Your db host has to be configured to allow remote access by the specified username and workstation. Refer to the mysql manual, there is a chapter on authentication and security.