My Oracle Support Banner

Native Error 1045 and Sqlstate HY000 Using DG4ODBC to Select From MySQL (Doc ID 781495.1)

Last updated on JANUARY 19, 2017

Applies to:

Oracle Database - Enterprise Edition - Version to [Release 11.1 to 11.2]
Information in this document applies to any platform.
Add ***Checked for relevance on 24-OCT-2012***


A Database Gateway for ODBC (DG4ODBC) connection to MySQL 5.1.30 using the MySQL 3.51 ODBC driver gives the following error connecting as the root user -

SQL> select "column_name" from "mysql_table"@mysql;
select "column_name" from "mysql_table"@mysql
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[unixODBC][MySQL][ODBC 3.51 Driver]Access denied for user 'root'@'hostname' (using
password: YES)
ORA-02063: preceding 2 lines from MYSQL

A DG4ODBC debug trace shows the following information -

Entered hgopoer at 2009/02/04-12:01:34
hgopoer, line 159: got native error 1045 and sqlstate HY000; message follows...
[unixODBC][MySQL][ODBC 3.51 Driver]Access denied for user 'root'@'hostname' (using password: YES)
Exiting hgopoer, rc=0 at 2009/02/04-12:01:34
hgocont, line 1903: calling SqlDriverConnect got sqlstate HY000
Exiting hgocont, rc=28500 at 2009/02/04-12:01:34 with error ptr FILE:hgocont.c LINE:1923
FUNCTION:hgocont() ID:Something other than invalid authorization
Exiting hgolgon, rc=28500 at 2009/02/04-12:01:34 with error ptr FILE:hgolgon.c LINE:612
FUNCTION:hgolgon() ID:Calling hgocont
Entered hgoexit at 2009/02/04-12:01:34
Exiting hgoexit, rc=0 at 2009/02/04-12:01:34



To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.
My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.