InterfaceError 2003 Can t connect to MySQL server on localhost 3306 10061 No connection could be made because the target machine actively refused it

0 votes

Hi Guys,

I am trying to connect to MySql server from my Python code. But I am not able to connect. It is showing me the below error.

InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306' (10061 No connection could be made because the target machine actively refused it)

How can I solve this error?

Jul 15, 2020 in Python by akhtar
• 38,260 points
22,172 views

1 answer to this question.

0 votes

Hi@akhtar,

You need to start your MySql server in your local system. Your Python connector is not able to connect with your MySql server. If you have your MySql server in the remote system, then specify the IP:3306.

Get a further understanding from the Microsoft SQL course

answered Jul 15, 2020 by MD
• 95,460 points

Related Questions In Python

0 votes
1 answer
0 votes
1 answer

Error:Can't connect to local MySQL server through socket '/tmp/mysql.sock

Hello @kartik, Try the code below: sudo /usr/local/mysql/support-files/mysql.server start ...READ MORE

answered Jun 24, 2020 in Python by Niroj
• 82,840 points
5,443 views
0 votes
3 answers

Python Selenium best tutorials for beginners

Hope this will help you...Python Tutorial READ MORE

answered Feb 11, 2019 in Python by aldrinjohn
• 140 points
3,931 views
0 votes
1 answer

how to solve the error : "ImportError: No module named Tkinter" in python.

Hi@Umama, If you are using Linux system, then ...READ MORE

answered Apr 27, 2020 in Python by MD
• 95,460 points
13,458 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP