Get help on databases - MySQL, Oracle, Access, etc.
DarkRanger
Registered User
Posts: 8346 Joined: 10 May 2006, 02:00
Processor: Intel i5-3750
Motherboard: Gigabyte
Graphics card: nVidia GTX 550Ti
Memory: 8GB Jetram
Contact:
Post
by DarkRanger » 22 Jun 2010, 11:15
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?
Ron2K
Forum Technical Administrator
Posts: 9050 Joined: 04 Jul 2006, 16:45
Location: Upper Hutt, New Zealand
Contact:
Post
by Ron2K » 22 Jun 2010, 11:33
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: 8346 Joined: 10 May 2006, 02:00
Processor: Intel i5-3750
Motherboard: Gigabyte
Graphics card: nVidia GTX 550Ti
Memory: 8GB Jetram
Contact:
Post
by DarkRanger » 22 Jun 2010, 11:42
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?
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:
Post
by Bladerunner » 22 Jun 2010, 11:51
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: 8346 Joined: 10 May 2006, 02:00
Processor: Intel i5-3750
Motherboard: Gigabyte
Graphics card: nVidia GTX 550Ti
Memory: 8GB Jetram
Contact:
Post
by DarkRanger » 22 Jun 2010, 12:01
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
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:
Post
by Bladerunner » 22 Jun 2010, 12:53
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: 8346 Joined: 10 May 2006, 02:00
Processor: Intel i5-3750
Motherboard: Gigabyte
Graphics card: nVidia GTX 550Ti
Memory: 8GB Jetram
Contact:
Post
by DarkRanger » 22 Jun 2010, 13:40
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!!
DarkRanger
Registered User
Posts: 8346 Joined: 10 May 2006, 02:00
Processor: Intel i5-3750
Motherboard: Gigabyte
Graphics card: nVidia GTX 550Ti
Memory: 8GB Jetram
Contact:
Post
by DarkRanger » 24 Jun 2010, 09:52
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...