The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

PHP/SQL question. by dodrian 2008-09-15 06:50:08
I'm trying to connect to a MySQL database in php. I have a user account and am required to use a password when connecting.

I'm using the statement:
$link = mysql_connect($_mysqlHost, $_mysqlUser, $_mysqlPass);

$_mysqlHost is 'localhost', and user/pass are set correctly. I'm getting the error:
Access denied for user 'XXXX'@'localhost' (using password: NO)
But I should be using the password.

Googling led me to think it had something to do with sql.safe_mode, except phpinfo(); says sql.safe_mode is 'off'.

Can anyone point me in the right direction?

[ Reply ]
  Is $_mysqlUser allowed to connect by imrambi2008-09-15 06:52:06
    Should only be allowed to connect from localhost. by dodrian2008-09-15 06:53:20
  maybe... by theonlyalterego2008-09-15 07:03:06
    It's a new website, so "everything" has changed. by dodrian2008-09-15 07:10:51
  Possibility: by Arachnid2008-09-15 07:03:36
    According to php.net by dodrian2008-09-15 07:07:45
      Related question: by Arachnid2008-09-15 07:08:50
        Because I'm new to PHP. by dodrian2008-09-15 07:12:24
          Check out: by Arachnid2008-09-15 07:19:39
            Thanks, I'll play around with them. (n/t) by dodrian2008-09-15 07:32:29
              Well, using mysqli didn't help. by dodrian2008-09-15 08:00:10
  The functions you're using... by jpprater2008-09-15 07:10:29
  This is a very stupid question: by EnzoMatrix2008-09-15 07:13:53
    Very stupid question from me that is.. by EnzoMatrix2008-09-15 07:15:52
    Yeah, triple checked those :-) by dodrian2008-09-15 07:18:11
      Triple checked them by dumping them to screen? by EnzoMatrix2008-09-15 07:27:04
        Oh wow, that had something to do with it :-/ by dodrian2008-09-15 08:12:38
          How are the variables defined? by sazzer2008-09-15 08:15:44
            You could well be right. by dodrian2008-09-15 08:22:47
  Did you check context for 'user' is (or includes) by Acrisius2008-09-15 08:02:53
    Yeah, it wasn't defined. by dodrian2008-09-15 08:25:44
      That was the problem. by dodrian2008-09-15 08:32:41
        A note about globals: by EnzoMatrix2008-09-15 11:30:17

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)