dbcli / mycli

A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.
http://mycli.net
Other
11.49k stars 663 forks source link

Can't connect to MySQL server on 'localhost' #1166

Open Saboor-Hamedi opened 4 months ago

Saboor-Hamedi commented 4 months ago

mycli -u username -pmypassword: I get the following errro: (2003, "Can't connect to MySQL server on 'localhost' ([WinError 10061] No connection could be made because the target machine actively refused it)")

Saboor-Hamedi commented 4 months ago

I am using windows

Saboor-Hamedi commented 4 months ago

Here's the corrected version with the specified formatting retained:

I found the answer: In case you changed the port 3306 to something else, like 3307, which was the case for me, just type on CLI: mysql -u username -pyourpassword -P 3307. Make sure the -P 3307 is capitalized.