![]() ![]() |
| minidiapolis |
Oct 4 2011, 01:36 PM
Post
#1
|
|
Serious Coder ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 437 Joined: 3-September 06 Member No.: 57 |
what 's wrong with the following code ?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <?php $host = "localhost"; $username = "ZXXics"; $password = "XXXXXX711"; $connection = mysql_connect($host,$username,$password) or die("connection could not be established"); ?> </body> </html> I'm getting this error Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'localhost' (10061) in D:\Hosting\5246561\html\treats.php on line 14 connection could not be established |
| Darin McGrew |
Oct 4 2011, 02:33 PM
Post
#2
|
|
WDG Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Root Admin Posts: 7,850 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
Perhaps this will help:
http://dev.mysql.com/doc/refman/5.5/en/can...-to-server.html -------------------- Darin McGrew
WDG Member since 1998 |
| Frederiek |
Oct 5 2011, 01:57 AM
Post
#3
|
|
Programming Fanatic ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 3,539 Joined: 23-August 06 From: Europe Member No.: 9 |
-------------------- "The earth does not belong to us. We belong to the earth."
from Vue du ciel (in French) "Leave scepticism to others and take action" from HOME by Goodplanet An inconvenient truth by Al Gore |
| Christian J |
Oct 5 2011, 08:14 AM
Post
#4
|
|
¤¤¤¤¤¤¤¤¤ ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: WDG Moderators Posts: 4,739 Joined: 10-August 06 Member No.: 7 |
In some cases it seems the user name must be "root".
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 18th May 2013 - 03:39 AM |