Remote connection to mysqlserver (1 Viewer)

cyd44

Registered User.
Local time
Today, 10:00
Joined
Oct 30, 2011
Messages
85
I have developd 3 new php pages for my web which work perfectly on my local machine. I have now put these scripts onto my isp server after uploading the database. I have changed the connection string to reflect what i have on the remote machine, the string is as follows:-
Code:
$link = mysql_connect("localhost", "uks52136root", "my Valid password");
mysql_select_db("uks52136Golf", $link);
$names = mysql_query ("SELECT * FROM course_name WHERE Region='$myregion'");

However, i am getting errors returned when I try to run it as follows:-
Code:
[COLOR=#008000][B][I]Warning: mysql_connect() [[/I][/B][/COLOR][URL="http://www.ocean-links-golf.com/Scripts/function.mysql-connect"][COLOR=#0066cc][B][I]function.mysql-connect[/I][/B][/COLOR][/URL][COLOR=#008000][I][B]]: Access denied for user 'uks52136root'@'localhost' (using password: YES) in /home/users/uks52136/html/ocean-links-golf.com/Scripts/Listing.php on line 52[/B][/I][/COLOR]
 
[I][COLOR=#008000][B]Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/users/uks52136/html/ocean-links-golf.com/Scripts/Listing.php[/B][B] on line 53[/B][/COLOR][/I]
 
[I][COLOR=#008000][B]Warning: mysql_query() [[/B][/COLOR][/I][URL="http://www.ocean-links-golf.com/Scripts/function.mysql-query"][COLOR=#0066cc][B][I]function.mysql-query[/I][/B][/COLOR][/URL][COLOR=#008000][I][B]]: Access denied for user 'www-data'@'localhost' (using password: NO) in /home/users/uks52136/html/ocean-links-golf.com/Scripts/Listing.php on line 55[/B][/I][/COLOR]
 
[I][COLOR=#008000][B]Warning: mysql_query() [[/B][/COLOR][/I][URL="http://www.ocean-links-golf.com/Scripts/function.mysql-query"][COLOR=#0066cc][B][I]function.mysql-query[/I][/B][/COLOR][/URL][I][COLOR=#008000][B]]: A link to the server could not be established in /home/users/uks52136/html/ocean-links-golf.com/Scripts/Listing.php on line 55[/B][/COLOR][/I]
ID Name Location Type Par Description
[B]Warning[/B]: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in [B]/home/users/uks52136/html/ocean-links-golf.com/Scripts/Listing.php[/B] on line [B]59[/B]

I am very new to php and mysql so could someone please advise me on the above.

Grateful in advance
 

Users who are viewing this thread

Top Bottom