MySQL Forums
Forum List  »  Newbie

Re: Access denied for user 'ODBC'@'localhost' (using password: NO) THE FIX
Posted by: gareth_holroyd
Date: July 15, 2005 02:21PM

This happens with MySQL 4.1 because PHP 4.x has an older version of the MySQL client embedded within it which is not compatible with the passwords used by 4.1.

To confirm this is the problem you have create a user with no password and try to connect via php as that user. It should work.

The easiest fix is to convert your passwords to the old format:

update mysql.user set password = old_password('password')
where user = 'username';
flush privileges;

You can also set a parameter in the my.ini file to always use old passwords:

# Use old passwords for compatibility with PHP 4.x client
old_passwords

The error message is misleading, it is nothing to do with ODBC!

See http://dev.mysql.com/doc/mysql/en/old-client.html

Options: ReplyQuote


Subject
Written By
Posted
Re: Access denied for user 'ODBC'@'localhost' (using password: NO) THE FIX
July 15, 2005 02:21PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.