![]() |
|
|
|||||||
![]() |
|
|
Thread Tools | Rate Thread |
|
|
PM User | #1 |
|
New to the CF scene Join Date: Jan 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
Access denied for user 'ODBC'@'localhost' (using password: NO)
Hey guys,
I am using windows XP Pro edition. I have installed MySQL version 4.1.9, Apache 2.0 and PHP 4.3.10. I have been trying to install this chat system called bribble, web address http://www.bribble.com. It accesses MySQL server and then reads/writes to a database in it. However, when I enter the string for connecting to it using php, I get this error "Access denied for user 'ODBC'@'localhost' (using password: NO)". Browsing around a few forums tells me that this is some bug in the newer versions of MySQL. Anyways here is the string in the php file $db_host = "localhost"; // database host $db_name = "bribble"; // database name $db_login = "root"; // database user $db_pass= "*****"; // database password This is the code that I have put in another file. $db = mysql_connect($db_host, $db_login, $db_pass); mysql_select_db($db_name,$db); I know for a fact that the MySQL server works fine, the root has been set up with a password that I enter. And then I get the error message. Any ideas for getting round this one? Regards, Jay |
|
|
|
|
|
PM User | #2 |
|
Regular Coder ![]() Join Date: Nov 2004
Location: Somewhere over the rainbow
Posts: 208
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
I have seen this, and fixed it before - but i can't remember how, I'm afraid...
I'll think about it and get back to you. as an extra consideration, though - using the "root" user is a security hole...
__________________
Questions are what binds the universe, Questions lead to answers, Answers lead to knowledge, Knowledge leads to wisdom, Wisdom brings more questions -- Horus Kol, 2004 :) |
|
|
|
|
|
PM User | #3 |
|
New to the CF scene Join Date: Jan 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
Some of the fixes have been to install older versions...but I think thats not really a solution. Also, there was some mention of mysqli_connect instead of mysql_connect thats noticed in PHP 4/5 but I am not quite sure how I go about ensuring this in a windows installation as you need to type in some command.
Anyways, thank you in advance Regards, Jay |
|
|
|
|
|
PM User | #4 |
|
Regular Coder ![]() Join Date: Nov 2004
Location: Somewhere over the rainbow
Posts: 208
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
if you open the user table and look at the password for the user, is there * character at the start of it?
__________________
Questions are what binds the universe, Questions lead to answers, Answers lead to knowledge, Knowledge leads to wisdom, Wisdom brings more questions -- Horus Kol, 2004 :) |
|
|
|
|
|
PM User | #6 | |
|
Mega-ultimate member ![]() ![]() Join Date: Jun 2002
Location: Winona, MN - The land of 10,000 lakes
Posts: 1,632
Thanks: 1
Thanked 20 Times in 19 Posts
![]() |
Quote:
|
|
|
|
|
|
|
PM User | #8 | |
|
Regular Coder ![]() Join Date: Nov 2004
Location: Somewhere over the rainbow
Posts: 208
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
"ODBC"@"localhost" is the default user...
sorry, i think i just found the error: Quote:
PHP Code:
__________________
Questions are what binds the universe, Questions lead to answers, Answers lead to knowledge, Knowledge leads to wisdom, Wisdom brings more questions -- Horus Kol, 2004 :) |
|
|
|
|
|
|
PM User | #9 |
|
New to the CF scene Join Date: Mar 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
error msg
hi i get that access denied error msg when i just do things like
shell> mysql -u root and i read the post that asked whether the password for the user had a * in front and i looked at my password and it was *<trashtrash> so what do i do to fix this error? thanks brian |
|
|
|
|
|
PM User | #11 |
|
New to the CF scene Join Date: Feb 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
same problem as JBK_1 and tried the other solutions but it did not work yet....
Hi Guys,
I have the same problem with JBK_1 and I have been using the same code in the lower versions of PHP(4 series) and MySql (4 series). It's working in those versions, however, not in the versions of PHP 5 and MySql 5(I am also using the latest version of Apache for MySql 5 and PHP 5). I can access the MySql in the command prompt and manipulate the database but when I am accessing the MySql using the commands of PHP or the PHP Script, I am getting the access denied for user 'ODBC'@'localhost'(using password:NO). When I tried creating a database using phpmyadmin, It works... I can create a database and manipulate the data(adding and deleting). It is a PHP software, however, the script for connecting and manipulating data from this software is quite techy and I can't decifer it anymore. Can anyone give us a light from this problem..... Thanks
|
|
|
|
|
|
PM User | #12 |
|
New to the CF scene Join Date: Feb 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
Hi Guys,
try putting this problem to a search engine (I used Yahoo!) using this sentence: Access denied for user 'ODBC'@'localhost' (using password: NO) . You will see that there are sites with same problem. No text comming out from their site but only these words and a set of common warning messages from the PHP. I hope they are aware of this. |
|
|
|
|
|
PM User | #13 | |
|
Regular Coder ![]() Join Date: Feb 2005
Location: Texas
Posts: 472
Thanks: 1
Thanked 0 Times in 0 Posts
![]() |
Quote:
__________________
If you're reading this, it may already be too late! |
|
|
|
|
|
|
PM User | #14 | |
|
New Coder ![]() Join Date: Feb 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
Quote:
PHP Code:
|
|
|
|
|
|
|
PM User | #15 |
|
New to the CF scene Join Date: Oct 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
It is likely that the client is using the old paasword alogaritm. if the SQL server is newer than 4.1 and PHP is older that 5, you will get this problem.
A goos work-around is to change the password alogharitm to the old one. to do so, open the SQL command line. type your password. the promt says MYSQL> then type in this (The red is what you shall type) MYSQL> set password for -> some_user@localhost = OLD_PASSWORD('some_password'); replace some_user and some_password with the username and the password you want. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Rate This Thread | |
|
|