I have been trying to connect to company MySQL database via terminal on my Mac. I downloaded MySQL CLI via 'home brew' on my Mac:
$brew install mysql
Then, I followed the format as below:
$mysql -u user_name -p passwords -h host_name database_name
Yet, I got error message "ERROR 2003 (HY000): Can't connect to MySQL server on 'host_name' (60)". Could any one tell me how to fix this? Thanks!
We definitely need more details to help you , but with a quick guess I think that you need to start MySQL first
sudo /usr/local/mysql/support-files/mysql.server start
Also , it is a good idea to check the status of the server before you try to connect to it.
sudo /usr/local/mysql/support-files/mysql.server status
*Paths depend on the installation path of MySQL
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With