ASP.NET Windows 7 Cannot Connect to MySQL Database

I have been tryig to connect to a MySQL database using tools and code since I upgraded my computer to Windows 7 and started using AVG Anti Virus Software and have not been successful at doing so.

The error is:
"2003 - Can't connect to MySQL server on 'server name' (10060)"
or
"2003 - Can't connect to MySQL server on 'server name' (10061)"

Please advise.
LVL 1
Howard BashSenior Software EngineerAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Howard BashConnect With a Mentor Senior Software EngineerAuthor Commented:
Turns out that when the database was created there is an option to allow remote access.  If the database is created with that enabled then problem solved.
0
 
UmeshMySQL Principle Technical Support EngineerCommented:
Hi!!

This is not the case with Windows 7 or any OS.. it causes due to couple of reasons and primarily because of firewall; which in turn preventing mysql from reaching any outside requests...

- Make sure MySQL is up and running
- Make sure the port isn't blocked for outside world - from remore box telnet to mysql host on defined port and confirm if it is acknowledging requests..
- Add MySQL Server port to the exception list of firewall

0
 
Howard BashSenior Software EngineerAuthor Commented:
MySQL is running on a remote server.  The database is for a WordPress Blog and the blog is running so I know that the database is up.

As far as a blocked port I am running AVG and it has a firewall and not running Microsoft's Firewall as a result.  I have tried turning off the AVG firewall and it had no positive affect.
0
 
Howard BashSenior Software EngineerAuthor Commented:
The solution was to configure the database correctly.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.