From: "Jacob Kruger" on
Still getting the following error although now created a specific user that granted all privileges to for the specific database, using PHPMyAdmin, and the error returned is still the following:
(Problem: Access denied for user 'ODBC'@'localhost' (using password: NO)


I am specifically connecting using the new username/password combo, so no idea why it's 'ignoring' them...?

$con = mysql_connect($mySQLServer,$mySQLUsername, $mySQLPassword);

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'



__________ Information from ESET NOD32 Antivirus, version of virus signature database 5215 (20100621) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

From: "Sascha Meyer" on
Hi Jacob,

Jacob wrote:
> Still getting the following error although now created a specific user
> that granted all privileges to for the specific database, using PHPMyAdmin,
> and the error returned is still the following:
> (Problem: Access denied for user 'ODBC'@'localhost' (using password: NO)

I bet the MySQL connection fails because of uninitialized variables, otherwise you'd see your passed username in the error message ('root'@'localhost') instead of ODBC.
Could you try the following instead to connect to MySQL:
[CODE]
$dbServer = "localhost";
$dbUser = "root";
$dbPass = "root";
$dbName = "YOURDB";

$conn = mysql_connect($dbServer, $dbUser, $dbPass);
if ($conn){
$res = mysql_select_db($dbName);
if ($res){
print "Connection established";
} else {
print "Selecting db failed";
}
} else {
print "Connection failed with ".mysql_error();
}
[/CODE]

Could you give us some more info about your file structure of your web? Especially, where are the $my... variables initialized used in the mysql_connect() call?

Best regards,

Sascha
--
Freundliche Grüße / Kind regards,

Sascha Meyer
--------------------------------------------------
EE: http://www.experts-exchange.com/M_761556.html
ZCE: http://www.zend.com/en/yellow-pages#show-ClientCandidateID=ZEND011290

GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
From: "Edward W. Rouse" on
I'm not a big php user, but, if you have set and are using a password, why
does the access denied message show (using password: NO). If memory serves
(and it has been a while) using ODBC means that you have to set up an ODBC
'proxy' that you use to actually make the DB connection. So my question
would be: Did you specify a password when you set up the ODBC connection?

I don't remember if ODBC allows password pass-through (or if it does now).

Edward W. Rouse


-----Original Message-----
From: Jacob Kruger [mailto:jacobk(a)mailzone.co.za]
Sent: Monday, June 21, 2010 11:19 AM
To: php-windows(a)lists.php.net
Subject: [PHP-WIN] Still got issue with 'odbc' user

Still getting the following error although now created a specific user that
granted all privileges to for the specific database, using PHPMyAdmin, and
the error returned is still the following:
(Problem: Access denied for user 'ODBC'@'localhost' (using password: NO)


I am specifically connecting using the new username/password combo, so no
idea why it's 'ignoring' them...?

$con = mysql_connect($mySQLServer,$mySQLUsername, $mySQLPassword);

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'



__________ Information from ESET NOD32 Antivirus, version of virus signature
database 5215 (20100621) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


From: "Edward W. Rouse" on
If I misunderstood the user ODBC, then try this link:

http://forums.mysql.com/read.php?35,185032,246936#msg-246936

Edward W. Rouse


-----Original Message-----
From: Jacob Kruger [mailto:jacobk(a)mailzone.co.za]
Sent: Monday, June 21, 2010 11:19 AM
To: php-windows(a)lists.php.net
Subject: [PHP-WIN] Still got issue with 'odbc' user

Still getting the following error although now created a specific user that
granted all privileges to for the specific database, using PHPMyAdmin, and
the error returned is still the following:
(Problem: Access denied for user 'ODBC'@'localhost' (using password: NO)


I am specifically connecting using the new username/password combo, so no
idea why it's 'ignoring' them...?

$con = mysql_connect($mySQLServer,$mySQLUsername, $mySQLPassword);

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'



__________ Information from ESET NOD32 Antivirus, version of virus signature
database 5215 (20100621) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


From: "Jacob Kruger" on
Ok, your mail made me realise why it wasn't working...the variable values
were being assigned above, but outside the function I was enclosing the
connect etc. in, but when I moved their assignment inside the function, it
now seems to work.

This database specific code is also being set apart in a separate file that
am including/requiring in the other pages using the require() function, and
then am calling the connectDB() function that now includes assigning values
to those variables, so seems like maybe it wasn't seeing the value
assignments before trying to call the function or something.

The idea behind that part of it was to allow me to make one change to
database details that would still affect all the pages as such.

Thanks either way, since it's now working.

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'

----- Original Message -----
From: "Sascha Meyer" <harlequin2(a)gmx.de>
To: "Jacob Kruger" <jacobk(a)mailzone.co.za>; <php-windows(a)lists.php.net>
Sent: Monday, June 21, 2010 5:45 PM
Subject: Re: [PHP-WIN] Still got issue with 'odbc' user


> Hi Jacob,
>
> Jacob wrote:
>> Still getting the following error although now created a specific user
>> that granted all privileges to for the specific database, using
>> PHPMyAdmin,
>> and the error returned is still the following:
>> (Problem: Access denied for user 'ODBC'@'localhost' (using password: NO)
>
> I bet the MySQL connection fails because of uninitialized variables,
> otherwise you'd see your passed username in the error message
> ('root'@'localhost') instead of ODBC.
> Could you try the following instead to connect to MySQL:
> [CODE]
> $dbServer = "localhost";
> $dbUser = "root";
> $dbPass = "root";
> $dbName = "YOURDB";
>
> $conn = mysql_connect($dbServer, $dbUser, $dbPass);
> if ($conn){
> $res = mysql_select_db($dbName);
> if ($res){
> print "Connection established";
> } else {
> print "Selecting db failed";
> }
> } else {
> print "Connection failed with ".mysql_error();
> }
> [/CODE]
>
> Could you give us some more info about your file structure of your web?
> Especially, where are the $my... variables initialized used in the
> mysql_connect() call?
>
> Best regards,
>
> Sascha
> --
> Freundliche Grüße / Kind regards,
>
> Sascha Meyer
> --------------------------------------------------
> EE: http://www.experts-exchange.com/M_761556.html
> ZCE: http://www.zend.com/en/yellow-pages#show-ClientCandidateID=ZEND011290
>
> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 5216 (20100621) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>


__________ Information from ESET NOD32 Antivirus, version of virus signature database 5216 (20100621) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



 |  Next  |  Last
Pages: 1 2
Prev: Next issue
Next: PHP Job Search