Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-18-2012, 08:39 PM   PM User | #1
Jian0203
New Coder

 
Join Date: Mar 2012
Posts: 47
Thanks: 2
Thanked 0 Times in 0 Posts
Jian0203 is an unknown quantity at this point
Error while running mysql and .php on web server



H, everyone. I'm totally new to MySQL and php. I took few hours to figure out how to use the XAMPP to host a virtual web server. Faced so much problems and luckily, they are solved.

But when I run the .php with my .sql import to a database in phpMyAdmin, the errors displayed in the picture just prompted. I tried to find solution online but it seems i cant find a suitable solution.

Can anyone provide me some helps please?

Thank you so much for spending time to read my problem. Much appreciate if solution can be given

Just in case if you can't see the picture :
Quote:
Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO) in C:\xampp\htdocs\graphicalpass2\connection.php on line 7

Warning: mysql_select_db(): Access denied for user ''@'localhost' (using password: NO) in C:\xampp\htdocs\graphicalpass2\connection.php on line 12

Warning: mysql_select_db(): A link to the server could not be established in C:\xampp\htdocs\graphicalpass2\connection.php on line 12

Warning: mysql_query(): Access denied for user ''@'localhost' (using password: NO) in C:\xampp\htdocs\graphicalpass2\register.php on line 12

Warning: mysql_query(): A link to the server could not be established in C:\xampp\htdocs\graphicalpass2\register.php on line 12

Warning: mysql_query(): Access denied for user ''@'localhost' (using password: NO) in C:\xampp\htdocs\graphicalpass2\register.php on line 13

Warning: mysql_query(): A link to the server could not be established in C:\xampp\htdocs\graphicalpass2\register.php on line 13

Warning: mysql_query(): Access denied for user ''@'localhost' (using password: NO) in C:\xampp\htdocs\graphicalpass2\register.php on line 14

Warning: mysql_query(): A link to the server could not be established in C:\xampp\htdocs\graphicalpass2\register.php on line 14

Warning: mysql_query(): Access denied for user ''@'localhost' (using password: NO) in C:\xampp\htdocs\graphicalpass2\register.php on line 15

Warning: mysql_query(): A link to the server could not be established in C:\xampp\htdocs\graphicalpass2\register.php on line 15

Warning: mysql_query(): Access denied for user ''@'localhost' (using password: NO) in C:\xampp\htdocs\graphicalpass2\register.php on line 16

Warning: mysql_query(): A link to the server could not be established in C:\xampp\htdocs\graphicalpass2\register.php on line 16

Warning: mysql_query(): Access denied for user ''@'localhost' (using password: NO) in C:\xampp\htdocs\graphicalpass2\register.php on line 17

Warning: mysql_query(): A link to the server could not be established in C:\xampp\htdocs\graphicalpass2\register.php on line 17

Warning: mysql_query(): Access denied for user ''@'localhost' (using password: NO) in C:\xampp\htdocs\graphicalpass2\register.php on line 18

Warning: mysql_query(): A link to the server could not be established in C:\xampp\htdocs\graphicalpass2\register.php on line 18

Warning: mysql_query(): Access denied for user ''@'localhost' (using password: NO) in C:\xampp\htdocs\graphicalpass2\register.php on line 19

Warning: mysql_query(): A link to the server could not be established in C:\xampp\htdocs\graphicalpass2\register.php on line 19

Warning: mysql_query(): Access denied for user ''@'localhost' (using password: NO) in C:\xampp\htdocs\graphicalpass2\register.php on line 20

Warning: mysql_query(): A link to the server could not be established in C:\xampp\htdocs\graphicalpass2\register.php on line 20

Warning: mysql_query(): Access denied for user ''@'localhost' (using password: NO) in C:\xampp\htdocs\graphicalpass2\register.php on line 21

Warning: mysql_query(): A link to the server could not be established in C:\xampp\htdocs\graphicalpass2\register.php on line 21

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\graphicalpass2\register.php on line 35

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\graphicalpass2\register.php on line 41

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\graphicalpass2\register.php on line 47

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\graphicalpass2\register.php on line 53

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\graphicalpass2\register.php on line 59

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\graphicalpass2\register.php on line 65

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\graphicalpass2\register.php on line 71

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\graphicalpass2\register.php on line 77

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\graphicalpass2\register.php on line 83

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\graphicalpass2\register.php on line 89
Jian0203 is offline   Reply With Quote
Old 12-18-2012, 10:04 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,650
Thanks: 4
Thanked 2,451 Times in 2,420 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Most of this is simply due to poor error handling in the script. It just happily assumes everything is good and keeps going.

Your configurations are simply invalid. Provide a valid server, username, and password to the connection and go from there. There is no way to tell if its invalid beyond that, so you need to fix it up a part at a time.
There sure seems to be a lot of repeating errors here. You're not opening and closing a connection within a loop are you?
Fou-Lu is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:12 PM.


Advertisement
Log in to turn off these ads.