You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to setup caching_sha2_password authentication login using this library and I was always getting "1045: access denied" error.
I tried to build a sample application using naked C API
"building mysql client library with ssl support"
I worked fine for me. So I debugged the source and find out an issue that causes this error.
In function 'DBDriver::connect_prepare' file lib/dbdriver.cpp:109
there is a call to 'mysql_init(&mysql_);'
This call actually resets all the memory on which we enabled the ssl using 'DBDriver::enable_ssl'.
I have commented out this call from there and moved it to 'DBDriver::enable_ssl' function call.
This patch is working fine for me. Not sure whether this is fixing it or has some other issues get popped with this change.
This patch is like working for SSL based connection only. For plain authentication it probably not going to work.
Please update on it if I'm doing anything wrong in the code below:
I was trying to setup caching_sha2_password authentication login using this library and I was always getting "1045: access denied" error.
I tried to build a sample application using naked C API
"building mysql client library with ssl support"
I worked fine for me. So I debugged the source and find out an issue that causes this error.
In function 'DBDriver::connect_prepare' file lib/dbdriver.cpp:109
there is a call to 'mysql_init(&mysql_);'
This call actually resets all the memory on which we enabled the ssl using 'DBDriver::enable_ssl'.
I have commented out this call from there and moved it to 'DBDriver::enable_ssl' function call.
This patch is working fine for me. Not sure whether this is fixing it or has some other issues get popped with this change.
This patch is like working for SSL based connection only. For plain authentication it probably not going to work.
Please update on it if I'm doing anything wrong in the code below:
The text was updated successfully, but these errors were encountered: