c++ Connector returns Access Denied for user 'ODBC'@localhost' (using password: NO)
Posted by: Joseph Freiburg - Private
Date: August 11, 2011 03:43PM

My eyes are weary - I've been looking at this for far to long without moving ahead. We have a C++ application and the first time we try to access the database with:
driver = get_driver_instance();
con = driver->connect(_fully_qualified_url, _user_name, _password);

The code throws an exception and yields the string:
Access Denied for user 'ODBC'@'localhost' (using password: NO)

We use the mysql-connector-c++-1.1.0-win32.msi connector. Other than the obvious C++ debugging techniques, I've also tried numerous connector/database (32/64bit) combinations. We use Visual Studio 2008 Express and a Win 7 platform. Two weird things: It did work once on another development machine (albeit Win XP and not 7) and I can fully access the DB with the Workbench tool - same login/passwd. Both the DB and C++ app. are running on localhost and yes - Port 3306 is open in the Win 7 firewall.

Any help, tips or pointers would be greatly appreciated.

Okay, one step further. It seems this is the same type of problem as seen in the "SQLString anomaly" entry. I'll close this up as it has nothing to do with access issues, rather that strings aren't being correctly passed as parameters.



Edited 3 time(s). Last edit at 08/12/2011 02:52PM by Joseph Freiburg - Private.

Options: ReplyQuote


Subject
Views
Written By
Posted
c++ Connector returns Access Denied for user 'ODBC'@localhost' (using password: NO)
1879
August 11, 2011 03:43PM


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.