To connect to MySQL from the command line, follow these steps: Log in to your A2 Hosting account using SSH. At the command line, type the following command, replacing USERNAME with your username: mysql -u USERNAME -p. At the Enter Password prompt, type your password..