Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MySQL++ - Programming with the C++ API to MySQL
MaxDB - Everything about MaxDB, formerly known as SAP DB
ODBC - ODBC with the MySQL Connector/ODBC driver
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
Subject: mysql openssl Question
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
Update one field with more fields from another table
Subject: Getting Identity after INSERT
ERROR 2002: Can 't connect to local MySQL server through socket
mysql test 4 1 fails with the gis test
Subject: MySQL Cluster Software
Downgrade Mysql from 4 to 3 23
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Can 't access mysql after kernel upgrade
Executing MySQL Commands From Within C Program
Comparing and writing out BLOBS
Subject: Re: Preventing Duplicate Entries
FULLTEXT query format question
Strange behavior, Table Level Permission
Does the binary log enabling affect the MySQL performances?
mysql:it 's a db not a dbms how it 's possible?!
mysql have same function mthod as Oracle decode()
 
Subject: Can 't connect to MySQL using SSL

Subject: Can 't connect to MySQL using SSL

2007-09-01       - By Santo Leto

 Back

Hello List.

I've the same problem described in http://forums.mysql.com/read.php?37,169713
,169713#msg-169713 (See http://msg-169713.ora-code.com)

Indeed, I've a running MySQL Server on Windows with SSL support (i.e. HAVE
_OPENSSL = YES).
I can connect with a ssl user using my certificates:

mysql --defaults-file="C:\Programmi\MySQL\mysql-5 (See http://sql-5.ora-code.com).1.20-beta-win32\my-small-ssl
.ini" -P 5120 -ussl -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 39
Server version: 5.1.20-beta-community-nt-debug-log MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> \s
-- ---- ------
mysql  Ver 14.13 Distrib 5.1.20-beta, for Win32 (ia32)

Connection id:          39
Current database:
Current user:           ssl@(protected)
SSL:                    Cipher in use is DHE-RSA-AES256-SHA
Using delimiter:        ;
Server version:         5.1.20-beta-community-nt-debug-log MySQL Community Serve
r (GPL)
Protocol version:       10
Connection:             localhost via TCP/IP
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    latin1
Conn.  characterset:    latin1
TCP port:               5120
Uptime:                 22 hours 35 min 56 sec

Threads: 1  Questions: 224  Slow queries: 0  Opens: 101  Flush tables: 1  Open t
ables: 1  Queries per second avg: 0.2
-- ---- ------

Also, I can connect using the API:

mysql_ssl_set
mysql_real_connect

The problem is when I try to connect using MyODBC 3.51.19 with the same
parameters used with API and command line connections.

If I use the MyODBC GUI setup dialog:

SSL KEY:                                  C:\OpenSSL\client-key.pem
SSL CERTIFICATE:                    C:\OpenSSL\client-cert.pem
SSL CERTIFICATE AUTHORITY: C:\OpenSSL\ca-cert.pem
SSL CA PATH:                          C:\OpenSSL\
SSL CIPHER:                            DHE-RSA-AES256-SHA

the ODBC Manager gives me the following error:

Request returned with SQL_ERROR

Also, if I try to connect with ADO:

ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" _
                & "SERVER=localhost;" _
                & "DATABASE=database1;" _
                & "UID=ssl;" _
                & "PWD=;" _
                & "SSLCA=C:\OpenSSL\ca-cert.pem;" _
                & "SSLCAPATH=C:\OpenSSL;" _
                & "SSLCERT=C:\OpenSSL\client-cert.pem;" _
                & "SSLCIPHER=DHE-RSA-AES256-SHA;" _
                & "SSLKEY=C:\OpenSSL\client-key.pem;" _
                & "PORT=5120;" _
                & "OPTION=" & 2 + 3 + 8 + 32 + 2048 + 16384


a "SSL Connection Error" is returned.

Venu, Jim,
your help is much appreciated.

Thank you, Santo Leto.