marcelvanherk / Conquest-DICOM-Server

Conquest DICOM server, aiming for complete source code release
112 stars 47 forks source link

MySQL v8 support #30

Closed kuhlaid closed 1 year ago

kuhlaid commented 1 year ago

@marcelvanherk I'm trying to connect the DICOM server to MySQL v8 but receive ***MySQL Error message: Client does not support authentication protocol requested by server; consider upgrading MySQL client (I'm guessing because the Conquest server does not support the caching_sha2_password method). I had no problem with the DICOM server when I was working with an older version of MySQL.

I am running DGATE (1.5.0c, build Tue Dec 06 14:29:02 2022, bits 64). I tried my older versions of Conquest with the same issue when trying to connect to MySQL v8.

Is it possible/reasonable to run Conquest using MySQL v8?

The Conquest DICOM Server is awesome. Thank you for supporting it.

marcelvanherk commented 1 year ago

Hi, can you still enable mixed authentication on mysql8?

if you connect through odbc i guess you can maybe authenticate at the odbc datasource?

On Tue, 6 Dec 2022, 19:46 kuhlaid, @.***> wrote:

@marcelvanherk https://github.com/marcelvanherk I'm trying to connect the DICOM server to MySQL v8 but receive ***MySQL Error message: Client does not support authentication protocol requested by server; consider upgrading MySQL client (I'm guessing because the Conquest server does not support the caching_sha2_password method). I had no problem with the DICOM server when I was working with an older version of MySQL.

I am running DGATE (1.5.0c, build Tue Dec 06 14:29:02 2022, bits 64). I tried my older versions of Conquest with the same issue when trying to connect to MySQL v8.

Is it possible/reasonable to run Conquest using MySQL v8?

The Conquest DICOM Server is awesome. Thank you for supporting it.

— Reply to this email directly, view it on GitHub https://github.com/marcelvanherk/Conquest-DICOM-Server/issues/30, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVDWJMD6U4Z7UE53SCTEPTWL6JZNANCNFSM6AAAAAASV5MREU . You are receiving this because you were mentioned.Message ID: @.***>

kuhlaid commented 1 year ago

I created a MySQL v8 ODBC connection (My8Conn) after downloading the driver. If I change the dicom.ini to use

SQLHost                  = 127.0.0.1:3307
SQLServer                = My8Conn

... then I get the MySQL Error message: Client does not support authentication protocol requested by server.

The documentation says:

SQLHost. Name of host computer with SQL server. Only used in Postgres and MySQL mode.

SQLServer. Name of ODBC data source, path to directory with DBF database files in case the 
built-in DbaseIII driver is used, filename and path of the database file for SqLite, or name of 
database in MySQL mode. Empty for NULL driver.

I am using 127.0.0.1:3307 locally to connect to the database (not using the default port). If I change the dicom.ini to:

SQLHost                  = 
SQLServer                = My8Conn

...I receive MySQL Error message: Can't connect to MySQL server on 'localhost'. So the question is, how should I set the SQLHost variable?

I am not able to change the authentication method on the db server.

kuhlaid commented 1 year ago

I should note that in my last test I had MySql=1. When I changed the dicom.ini to:

SQLHost                  = 
SQLServer                = My8Conn
MySql                    = 0

...this setting seemed to enable the ODBC connection. I need to perform some additional testing but I believe this might work.

kuhlaid commented 1 year ago

It might be helpful to change the Windows document with regards to the MySQL setting in the dicom.ini, to say:

MySQL. Windows code is included for native access to a MySQL database. Setting this flag to 1 will enable the MySQL driver (set to 0 if using an ODBC connection to MySQL). Correct versions of the mysql DLL's (Windows only) are redistributed with the windows server release. For 64 bits, the DLL should be named libmysql64.dll. Default is 0.

kuhlaid commented 1 year ago

The ODBC connection is working for me using the following dicom.ini settings:

SQLHost                  = 
SQLServer                = My8Conn
MySql                    = 0

The key was to keep the SQLHost empty, set the SQLServer value to the ODBC connection name, and set MySql equal to 0.

Thank you sending me down the correct path @marcelvanherk. - cheers