cancel
Showing results for 
Search instead for 
Did you mean: 

Conntect to MySQL Database

Former Member
0 Kudos
975

Hello SAP Community!

I need a connection to a MySQL database from SAP. I read the post from Gudmundur Karlsson, , and followed his description. He said that we should use MSSQL as DBMS, but I am not able to connect to a MySQL Database.

Firstly, I installed the MySQL Connector/ODBC 5.1.6 and set up an ODBC connection called TEST on the Application Server in the control panel -> administrative tools. The connection test was successfully.

After that I made an entry in the transaction DBCO with the following details, based on the post from Gudmundur Karlsson:

Connection Name: MYSQL

DBMS: MSS

Username and Password from the MySQL Database.

Connection info: MSSQL_DSN=TEST

Then I wrote the following report to test the connection:

PARAMETERS: p_dbs TYPE dbcon-con_name DEFAULT 'MYSQL'.

EXEC SQL.

CONNECT TO :p_dbs

ENDEXEC.

WRITE: sy-subrc.

The sy-subrc is always 4.

Has anybody an explanation, how I can connect to a MySQL Database.

Kind regards!

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member204746
Active Contributor
0 Kudos

MySQL and MS-SQL are not the same thing. you cannot use method from , for MySQL.

Former Member
0 Kudos

Hi,

@Bhavik G. Shroff:

The OS Platform is Windows Server 2003 x64. The DBMSSSLIB.DLL is in the run directory.

@Eric Brunelle:

I know that MySQL and MSSQL is not the same! I have tried it because this helped by another user.

I agree with Eric Brunelle that I can't use MSSQL as DBMS for a connection to a MySQL Database. Is there another way to make a connection to a MySQL Database?

Regards.

former_member204746
Active Contributor
0 Kudos

DBMSSSLIB.DLL is for Ms-SQL use only. so, obviously, it won't work for MySQL.

You can investigate usage of SAP PI which would probably fit.

or, export data from MySQL into a text fiel and use ABAP to read it afterward.

former_member524429
Active Contributor
0 Kudos

Hi,

SAP System in which DBCO entry is maintained is running on which OS Platform ?

Required DLL (DBMSSSLIB.DLL) has been put in SAP Instance's Kernel executable directory (If SAP system is running on Windows platform)?

Have you referred this Useful [SAP Note 323151 - Several DB connections with Native SQL|https://service.sap.com/sap/support/notes/323151] and [SAP Note 738371 - Creating DBCON multiconnect entries for SQL Server|https://service.sap.com/sap/support/notes/738371] ? Read them and do the required configuration settings if any one is missing.

As per SAP Note 738371,

The application server(s) where a DBCON connection is used must be running Windows,
and they must have the MS SQL Server DBSL library dbmssslib.dll installed in the run directory (/sapmnt/<SAPSID>/exe).
If your database platform is not SQL Server, then this DLL must be downloaded from the SAP Service Marketplace for your R/3 kernel version.

Regards,

Bhavik G. Shroff