PHP Help Please
Posted by: Shissar (---.socal.res.rr.com)
Date: March 11, 2008 07:23AM

Hi guys.. I need some help, and would appreciate if anyone can assist me...

I am very new to the PHP and SQL systems, I have only ever used apache as a single application years ago.. Here is what im trying to do...

I've got this PHP file im trying to run, and I have no idea what im doing wrong, I have read and read the commands, help files, and cannot get anywhere.. Im hoping someone with experiance with this software can help me get this running.. I have managed to get my web-site working (Can log on via [localhost] but when I go into "sign up now" (Which loads the accountcreation.php) I get an error message, here is the error message, and I will also post the whole PHP under the error message...

At this point, I am very very lost and cannot figure this out, any help would be appreciated. My email & windows live/msn messenger email is:

Shissar@gmail.com

Any help would be GREATLY appreciated:


Error Message from [localhost]

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'meridian_666'@'localhost' (using password: YES) in C:\wamp\www\m59acccreator.php on line 20
I cannot connect to the database because: Access denied for user 'meridian_666'@'localhost' (using password: YES)



PHP (From Notepad)

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Meridian 59 - News</title>
</head>

<body background="images/m59_website_09.jpg">

<h2 align="center"><font face="Arial" color="#FFFFFF" size="5">Sign Up
Now! Play in just seconds!</font></h2>
<p align="center"><font face="Arial" color="#FFFFFF" size="5">Free!
Easy! No personal info needed!</font></p>

<div align="center">
<center>
<table border="1" width="32%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">

<font size="2" face="Arial" color="#FFFFFF">
<form action="m59acccreator.php" method="post" name="acc">
<p align="left">
<input name="username" type="text" /><label> Username</label><br />

<input name="password1" type="password" /><label> Password</label><br />
<input name="password2" type="password" /><label> Repeat password</label><br />
<input name="Create" type="submit" value="Create" />
<input type="reset" name="Reset" value="Reset" />
</form>
<p>&nbsp;</td>
</tr>
</table>
</center>
</div>
</body>

Options: ReplyQuote
Re: PHP Help Please
Posted by: Shissar (---.socal.res.rr.com)
Date: March 11, 2008 07:25AM

I also went into PhpMyAdmin, clicked privilages, created a user named Meridian_666 and a password of YES
Still errors out

Options: ReplyQuote
Re: PHP Help Please
Posted by: Shissar (---.socal.res.rr.com)
Date: March 11, 2008 07:42AM

Ok I have made it work now, changed some things now im getting this error

I cannot connet to the database because: Table 'meridian_666.revs' doesn't exist

Options: ReplyQuote
Re: PHP Help Please
Posted by: Shissar (---.socal.res.rr.com)
Date: March 11, 2008 08:19AM

I created a table named Revs
Now I am getting an error saying this

I cannot connet to the database because: Unknown column 'user' is 'where clause'

Options: ReplyQuote
Re: PHP Help Please
Posted by: yfastud (Moderator)
Date: March 11, 2008 01:48PM

Oh my goodness, it does NOT work that way

First, you need to setup db account, check Setup DB guide on my personal website; when done, you have to import your db w/ all data into the db account you've just screated

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: PHP Help Please
Posted by: southbeach (---.not.configured)
Date: March 13, 2008 03:30PM

Shissar,

The problem you are having is not that the password should be YES but rather that your MySQL is set to NOT use any password and you are attempting to use one.

So, if you use $dbserver = mysql_connect("localhost","myUserID","myPassword"winking smiley;

you are attempting to connect to MySQL server using a user ID of myUserID and password myPassword. This will return an error if:

1) User is not valid
2) User is valid but wrong password
3) User is valid but no password is needed

(3) is what I think your problem is. So, try $dbserver = mysql_connect("localhost","myUserID",""winking smiley;

This last command connects to MySQL with password set to NO - In other words, no password is needed. Of course, this is NOT a good practice as it leaves your data exposed, one should always have a password.

Remove the user you created, you do not need it !!!

As yfastud suggested, read her online guide to learn more about setting up access and password to your MySQL databases. If needed, visit [dev.mysql.com]

Hope all goes well with you!

Options: ReplyQuote
Re: PHP Help Please
Posted by: yfastud (Moderator)
Date: March 13, 2008 04:23PM

Quote

As yfastud suggested, read her online guide
he he... he he... ;-)
It's him, not her

As mentioned, she keeps adding item by item each time seeing an error, but I guess she didn't create a db or already created db but didn't import all tables and data yet, and even had db, she still need to setup privilege for user to access that particular db

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: PHP Help Please
Posted by: southbeach (---.not.configured)
Date: March 13, 2008 05:49PM

Sorry yfastud, I guess that having seen the picture of a woman on your page lead me to believe it was you eye rolling smiley shame on me 8-(

But you know, it is always easier and more forgiven to get a man's sex wrong than a woman so, it is safer to presume anyone as a "her" ... This is the problem with syber-names, one can never tell.

Won't happen again ... not with you any ways ...

Options: ReplyQuote
Re: PHP Help Please
Posted by: yfastud (Moderator)
Date: March 13, 2008 06:17PM

Quote

Sorry yfastud, I guess that having seen the picture of a woman on your page lead me to believe it was you eye rolling smiley shame on me 8-(
It's our "baby Pig" Emily and she's only 8mths old, so not a woman yet ;-) BTW, don't feel bad about it, I've never taken stuff like that personal ;-)

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote


Sorry, only registered users may post in this forum.