Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Saboor-Hamedi opened this issue Jul 4, 2024 · 2 comments
Open

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

Saboor-Hamedi opened this issue Jul 4, 2024 · 2 comments

Comments

@Saboor-Hamedi
Copy link

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
Copy link
Author

I am using windows

@Saboor-Hamedi
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant