Solved

ASP.NET Windows 7 Cannot Connect to MySQL Database

Posted on 2010-11-20
4
849 Views
Last Modified: 2012-05-10
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.
0
Comment
Question by:hbash
  • 3
4 Comments
 
LVL 26

Expert Comment

by:ushastry
Comment Utility
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
 
LVL 1

Author Comment

by:hbash
Comment Utility
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
 
LVL 1

Accepted Solution

by:
hbash earned 0 total points
Comment Utility
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
 
LVL 1

Author Closing Comment

by:hbash
Comment Utility
The solution was to configure the database correctly.
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Suggested Solutions

First some basics on Windows 7 Backup.  It has 2 components one is a file based backup which is stored in .zip files each zip is split at around 200 Megabytes and there is the Image Backup which is as the name implies a total image of the partition …
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now