Can't connect to MySQL server (10061)

Get help on databases - MySQL, Oracle, Access, etc.
Post Reply
DarkRanger
Registered User
Posts: 8343
Joined: 10 May 2006, 02:00
Processor: Intel i5-3750
Motherboard: Gigabyte
Graphics card: nVidia GTX 550Ti
Memory: 8GB Jetram
Contact:

Can't connect to MySQL server (10061)

Post by DarkRanger »

I get this error when I try to connect to the database:

Code: Select all

Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on '41.72.132.170' (10061) in C:\xampp\htdocs\intraweb\dynam_code\dbconnect.php on line 7
Could not connect to MySQL Server.
Any help regarding this?
Image
User avatar
Ron2K
Forum Technical Administrator
Posts: 9050
Joined: 04 Jul 2006, 16:45
Location: Upper Hutt, New Zealand
Contact:

Re: Can't connect to MySQL server (10061)

Post by Ron2K »

Check your connection details (server name, database name, username, password) - most likely, one or more of those are incorrect.
Kia kaha, Kia māia, Kia manawanui.
DarkRanger
Registered User
Posts: 8343
Joined: 10 May 2006, 02:00
Processor: Intel i5-3750
Motherboard: Gigabyte
Graphics card: nVidia GTX 550Ti
Memory: 8GB Jetram
Contact:

Re: Can't connect to MySQL server (10061)

Post by DarkRanger »

Ron2K wrote:Check your connection details (server name, database name, username, password) - most likely, one or more of those are incorrect.
If I use an ip to connect to the db server, is that a problem?
Image
Bladerunner
Registered User
Posts: 14338
Joined: 04 Sep 2004, 02:00
Processor: i386DX Sooper
Motherboard: A blue one
Graphics card: A red one
Memory: Hard drive
Location: On a Möbius strip
Contact:

Re: Can't connect to MySQL server (10061)

Post by Bladerunner »

DarkRanger wrote:
Ron2K wrote:Check your connection details (server name, database name, username, password) - most likely, one or more of those are incorrect.
If I use an ip to connect to the db server, is that a problem?
Did you specify port 3306? (or whatever port is applicable in your case)
If I weren't insane: I couldn't be so brilliant! - The Joker
DarkRanger
Registered User
Posts: 8343
Joined: 10 May 2006, 02:00
Processor: Intel i5-3750
Motherboard: Gigabyte
Graphics card: nVidia GTX 550Ti
Memory: 8GB Jetram
Contact:

Re: Can't connect to MySQL server (10061)

Post by DarkRanger »

Bladerunner wrote:Did you specify port 3306? (or whatever port is applicable in your case)
Yes I did. Port on the server is 3306. One of the first things I checked. Also put it in as 41:72:132:170:3306
Image
Bladerunner
Registered User
Posts: 14338
Joined: 04 Sep 2004, 02:00
Processor: i386DX Sooper
Motherboard: A blue one
Graphics card: A red one
Memory: Hard drive
Location: On a Möbius strip
Contact:

Re: Can't connect to MySQL server (10061)

Post by Bladerunner »

DarkRanger wrote:
Bladerunner wrote:Did you specify port 3306? (or whatever port is applicable in your case)
Yes I did. Port on the server is 3306. One of the first things I checked. Also put it in as 41:72:132:170:3306
You mean 41.72.132.170:3306 ?
If I weren't insane: I couldn't be so brilliant! - The Joker
DarkRanger
Registered User
Posts: 8343
Joined: 10 May 2006, 02:00
Processor: Intel i5-3750
Motherboard: Gigabyte
Graphics card: nVidia GTX 550Ti
Memory: 8GB Jetram
Contact:

Re: Can't connect to MySQL server (10061)

Post by DarkRanger »

Bladerunner wrote:
DarkRanger wrote:
Bladerunner wrote:Did you specify port 3306? (or whatever port is applicable in your case)
Yes I did. Port on the server is 3306. One of the first things I checked. Also put it in as 41:72:132:170:3306
You mean 41.72.132.170:3306 ?
yes. my bad!!
Image
DarkRanger
Registered User
Posts: 8343
Joined: 10 May 2006, 02:00
Processor: Intel i5-3750
Motherboard: Gigabyte
Graphics card: nVidia GTX 550Ti
Memory: 8GB Jetram
Contact:

Re: Can't connect to MySQL server (10061)

Post by DarkRanger »

For those who might have the same problem, here is the fix:

head over to your MySQL config file: /etc/mysql/my.conf and comment the line that says bind_address. That works...
Image
Post Reply