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,170 points
5,409 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.

answered Jul 15, 2020 by MD
• 95,180 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,720 points
2,032 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
2,407 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,180 points
9,540 views
0 votes
1 answer