[Solved] mysql warning

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
shaneshup
Forum Newbie
Posts: 2
Joined: Wed Sep 06, 2006 7:40 am

[Solved] mysql warning

Post by shaneshup »

Hiya Guys

I am having problems with a script that i have installed. My understanding of php and mysql is pretty much none existent (i simply followed the read me file to install)
Whilst the layout and and images are all ok, some of the pages show me:
Warning: mysql_query() [function.mysql-query]: Access denied for user 'interes2'@'localhost' (using password: NO) in /home/interes2/public_html/its-myspace/index2.php on line 69

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/interes2/public_html/its-myspace/index2.php on line 69

Warning: mysql_query() [function.mysql-query]: Access denied for user 'interes2'@'localhost' (using password: NO) in /home/interes2/public_html/its-myspace/index2.php on line 70

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/interes2/public_html/its-myspace/index2.php on line 70

Warning: mysql_affected_rows() [function.mysql-affected-rows]: A link to the server could not be established in /home/interes2/public_html/its-myspace/index2.php on line 71

Warning: mysql_query() [function.mysql-query]: Access denied for user 'interes2'@'localhost' (using password: NO) in /home/interes2/public_html/its-myspace/index2.php on line 88

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/interes2/public_html/its-myspace/index2.php on line 88

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/interes2/public_html/its-myspace/index2.php on line 91

Now this means absolutly nothing to me, i have looked at stedted lines in the index2.php file, but like i said my understanding is none existent.

I was just wondering if any of you folks could help me out. Does anyone have a simple solution?

The site is http://www.it-myspace.com, and the effected pages are backgounds, layouts and most of the graphic pages (just incase this makes it easier to understand!!)

Warmest Regards

Shane
Last edited by shaneshup on Wed Sep 06, 2006 10:29 am, edited 1 time in total.
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post by CoderGoblin »

Warning: mysql_query() [function.mysql-query]: Access denied for user 'interes2'@'localhost' (using password: NO) in /home/interes2/public_html/its-myspace/index2.php on line 69

This is your main error, the others will probably go away when you fix this. Not an MySQL guru but mysql_connect has a password field you should use when connecting.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

GM
Forum Contributor
Posts: 365
Joined: Wed Apr 26, 2006 4:19 am
Location: Italy

Post by GM »

Further to the other responses, and given that you profess to have no knowledge whatsover of this, your first error is simply an invalid username/password message from MySQL. It is basically saying that the username/password you are trying to connect to the database with is not valid.

You need to check your database account, check the permissions on your database, and check that the database really is on localhost.
shaneshup
Forum Newbie
Posts: 2
Joined: Wed Sep 06, 2006 7:40 am

Post by shaneshup »

WOW!! You guys are great, Many thanks to all for the advise of where to look etc...

Everything appears to be working fine.

Sorry if i came across daft, but i am sure you can all appreciate the frustrations of a newbie!!!

Thanks Again

Warmest Regards

Shane :D
Post Reply