↧
MySQL Connector/ODBC 8.0.25 has been released (no replies)
↧
8.0.24 connector odbc breaks previously working queries (no replies)
The recently released 8.0.24/25 versions of the mysql-connector-odbc behave
very differently to .23 in our application. SQL statements that used to work are now failing. OS is Centos7.
Using mysql database logging we can demonstrate that things look very different
from start up. In the working case, all entries appear as "Query" while in the
failing case we see a mix of "Query, Prepare, Execute" for the same actions.
I include an example of the mysql logging at the foot of this note.
We have tested combinations of 8.0.23,24,25 database with 8.0.23 connector and
all is good. But as soon as we try 8.0.24 connector-odbc we get SQL errors. Our
conclusion is that changes introduced in 8.0.24 are the trigger for what we see.
The error as reported from the connector looks like this.....
[STATE: 42000 CODE 1064 ERROR: [MySQL][ODBC 8.0(a) Driver][mysqld-8.0.24] \
You have an error in your SQL syntax; check the manual that corresponds to \
your MySQL server version for the right syntax to use near 'insert into \
interfaces (type,name,description,syntax,ikey,filename,hostname) val' \
at line 2
And it only occurs when the connector calls mysql_stmt_prepare in function
prepare in file driver/my_stmt.cc.
I think the error is decided by the mysql library in the cli_advanced_command
function (from client.cc in the mysql-server/libmysql directory) when the function command arg is COM_STMT_PREPARE.
Our application is using multiple threads and the statements that fail seem to
be just after a context switch. We note that the behaviour in 8.0.23 seemed to
be more disciplined in terms of where context switching occurred. Switches in
the new code seem to be more frequent and to occur "in the middle" of familiar
patterns that previously didn't appear to be interrupted this way.
We believe the use of multiple statements separated by ';' may be part of the
mix here, in combination with multiple threads calling into the connector.
The problem has also appeared to move suggesting timing might be a contributory
factor.
Here is an example of what I see between the threads immediately prior to
failure. In each thread a series of operations from COM_QUERY set max execution
time, through COM_STMT_PREPARE "select 1", COM_STMT_EXECUTE to COM_STMT_CLOSE to a second prepare are clearly interleaved. Previously we don't believe this was the case.
System starts
Executes lots of statements successfully
Then...
Main Thread Event Thread
CQ (set max execution time)|===========================
===========================|CQ (set autocommit=0)
===========================|CQ (set max execution time)
CP (select 1) |===========================
CE |===========================
CC |===========================
===========================|CP (select 1)
CP (Replace into ....) |===========================
CE |===========================
===========================|CE
===========================|CC
===========================|CP (Update ....)
===========================|**FAILURE**
Key
==== used to show context switch has occurred
.... = statement body omitted
CQ=COM_QUERY
CP=COM_STMT_PREPARE
CE=COM_STMT_EXECUTE
CC=COM_STMT_CLOSE
Has anyone else seen similar problems with the new connector-odbc? Does anyone
on the forum have any suggestions for how to get to an actionable bug report
(e.g. are there things we can turn on that would provide extra information).
Below are two extracts from the mysql logging that to us show very different behaviour. The only difference between the two is the odbc connector version.
// 8.0.23 log extract (happy case)
2021-05-18T14:43:41.620139Z 12 Connect xxx@localhost on xxxdb using
Socket
2021-05-18T14:43:41.620817Z 12 Query SET NAMES latin1
2021-05-18T14:43:41.621266Z 12 Query SET character_set_results = NULL
2021-05-18T14:43:41.621509Z 12 Query SET SQL_AUTO_IS_NULL = 0
2021-05-18T14:43:41.631293Z 12 Query set @@max_execution_time=30000
2021-05-18T14:43:41.631682Z 12 Query set @@sql_select_limit=DEFAULT
2021-05-18T14:43:41.631917Z 12 Query select 1
2021-05-18T14:43:41.632419Z 12 Query show status like 'wsrep_%'
2021-05-18T14:43:41.673510Z 12 Query set @@max_execution_time=30000
2021-05-18T14:43:41.673888Z 12 Query select 1
2021-05-18T14:43:41.674527Z 12 Query delete from channels
// 8.0.25 extract (broken case)
2021-05-18T14:39:23.127692Z 9 Connect xxx@localhost on xxxdb using
Socket
2021-05-18T14:39:23.338730Z 9 Query SET NAMES latin1
2021-05-18T14:39:23.339654Z 9 Query SET character_set_results = NULL
2021-05-18T14:39:23.339858Z 9 Query SET SQL_AUTO_IS_NULL = 0
2021-05-18T14:39:23.340504Z 9 Query set @@max_execution_time=30000
2021-05-18T14:39:23.373007Z 9 Prepare select 1
2021-05-18T14:39:23.373338Z 9 Query set @@sql_select_limit=DEFAULT
2021-05-18T14:39:23.373664Z 9 Execute select 1
2021-05-18T14:39:23.445888Z 9 Close stmt
2021-05-18T14:39:23.541445Z 9 Prepare show status like 'wsrep_%'
2021-05-18T14:39:23.541637Z 9 Execute show status like 'wsrep_%'
2021-05-18T14:39:23.597338Z 9 Close stmt
2021-05-18T14:39:23.597553Z 9 Query set @@max_execution_time=30000
2021-05-18T14:39:23.598021Z 9 Prepare select 1
2021-05-18T14:39:23.598123Z 9 Execute select 1
2021-05-18T14:39:23.598416Z 9 Close stmt
2021-05-18T14:39:23.616032Z 9 Prepare delete from channels
2021-05-18T14:39:23.616392Z 9 Execute delete from channels
2021-05-18T14:39:23.617779Z 9 Close stmt
very differently to .23 in our application. SQL statements that used to work are now failing. OS is Centos7.
Using mysql database logging we can demonstrate that things look very different
from start up. In the working case, all entries appear as "Query" while in the
failing case we see a mix of "Query, Prepare, Execute" for the same actions.
I include an example of the mysql logging at the foot of this note.
We have tested combinations of 8.0.23,24,25 database with 8.0.23 connector and
all is good. But as soon as we try 8.0.24 connector-odbc we get SQL errors. Our
conclusion is that changes introduced in 8.0.24 are the trigger for what we see.
The error as reported from the connector looks like this.....
[STATE: 42000 CODE 1064 ERROR: [MySQL][ODBC 8.0(a) Driver][mysqld-8.0.24] \
You have an error in your SQL syntax; check the manual that corresponds to \
your MySQL server version for the right syntax to use near 'insert into \
interfaces (type,name,description,syntax,ikey,filename,hostname) val' \
at line 2
And it only occurs when the connector calls mysql_stmt_prepare in function
prepare in file driver/my_stmt.cc.
I think the error is decided by the mysql library in the cli_advanced_command
function (from client.cc in the mysql-server/libmysql directory) when the function command arg is COM_STMT_PREPARE.
Our application is using multiple threads and the statements that fail seem to
be just after a context switch. We note that the behaviour in 8.0.23 seemed to
be more disciplined in terms of where context switching occurred. Switches in
the new code seem to be more frequent and to occur "in the middle" of familiar
patterns that previously didn't appear to be interrupted this way.
We believe the use of multiple statements separated by ';' may be part of the
mix here, in combination with multiple threads calling into the connector.
The problem has also appeared to move suggesting timing might be a contributory
factor.
Here is an example of what I see between the threads immediately prior to
failure. In each thread a series of operations from COM_QUERY set max execution
time, through COM_STMT_PREPARE "select 1", COM_STMT_EXECUTE to COM_STMT_CLOSE to a second prepare are clearly interleaved. Previously we don't believe this was the case.
System starts
Executes lots of statements successfully
Then...
Main Thread Event Thread
CQ (set max execution time)|===========================
===========================|CQ (set autocommit=0)
===========================|CQ (set max execution time)
CP (select 1) |===========================
CE |===========================
CC |===========================
===========================|CP (select 1)
CP (Replace into ....) |===========================
CE |===========================
===========================|CE
===========================|CC
===========================|CP (Update ....)
===========================|**FAILURE**
Key
==== used to show context switch has occurred
.... = statement body omitted
CQ=COM_QUERY
CP=COM_STMT_PREPARE
CE=COM_STMT_EXECUTE
CC=COM_STMT_CLOSE
Has anyone else seen similar problems with the new connector-odbc? Does anyone
on the forum have any suggestions for how to get to an actionable bug report
(e.g. are there things we can turn on that would provide extra information).
Below are two extracts from the mysql logging that to us show very different behaviour. The only difference between the two is the odbc connector version.
// 8.0.23 log extract (happy case)
2021-05-18T14:43:41.620139Z 12 Connect xxx@localhost on xxxdb using
Socket
2021-05-18T14:43:41.620817Z 12 Query SET NAMES latin1
2021-05-18T14:43:41.621266Z 12 Query SET character_set_results = NULL
2021-05-18T14:43:41.621509Z 12 Query SET SQL_AUTO_IS_NULL = 0
2021-05-18T14:43:41.631293Z 12 Query set @@max_execution_time=30000
2021-05-18T14:43:41.631682Z 12 Query set @@sql_select_limit=DEFAULT
2021-05-18T14:43:41.631917Z 12 Query select 1
2021-05-18T14:43:41.632419Z 12 Query show status like 'wsrep_%'
2021-05-18T14:43:41.673510Z 12 Query set @@max_execution_time=30000
2021-05-18T14:43:41.673888Z 12 Query select 1
2021-05-18T14:43:41.674527Z 12 Query delete from channels
// 8.0.25 extract (broken case)
2021-05-18T14:39:23.127692Z 9 Connect xxx@localhost on xxxdb using
Socket
2021-05-18T14:39:23.338730Z 9 Query SET NAMES latin1
2021-05-18T14:39:23.339654Z 9 Query SET character_set_results = NULL
2021-05-18T14:39:23.339858Z 9 Query SET SQL_AUTO_IS_NULL = 0
2021-05-18T14:39:23.340504Z 9 Query set @@max_execution_time=30000
2021-05-18T14:39:23.373007Z 9 Prepare select 1
2021-05-18T14:39:23.373338Z 9 Query set @@sql_select_limit=DEFAULT
2021-05-18T14:39:23.373664Z 9 Execute select 1
2021-05-18T14:39:23.445888Z 9 Close stmt
2021-05-18T14:39:23.541445Z 9 Prepare show status like 'wsrep_%'
2021-05-18T14:39:23.541637Z 9 Execute show status like 'wsrep_%'
2021-05-18T14:39:23.597338Z 9 Close stmt
2021-05-18T14:39:23.597553Z 9 Query set @@max_execution_time=30000
2021-05-18T14:39:23.598021Z 9 Prepare select 1
2021-05-18T14:39:23.598123Z 9 Execute select 1
2021-05-18T14:39:23.598416Z 9 Close stmt
2021-05-18T14:39:23.616032Z 9 Prepare delete from channels
2021-05-18T14:39:23.616392Z 9 Execute delete from channels
2021-05-18T14:39:23.617779Z 9 Close stmt
↧
↧
MySQL Connector Issue (1 reply)
Hi anyone help here..
I have been having issues with connector - I want to connect my MySQL localhost server to Power BI and Excel, but whatever I install it's giving me the same prompt and direct me to the same page. There are all the things I have tried to install:
mysql-connector-net-8.0.25
msodbcsql
mysql-connector-odbc-8.0.25-winx64
I'm using Win 10 and OS is 64 bit.
I have been having issues with connector - I want to connect my MySQL localhost server to Power BI and Excel, but whatever I install it's giving me the same prompt and direct me to the same page. There are all the things I have tried to install:
mysql-connector-net-8.0.25
msodbcsql
mysql-connector-odbc-8.0.25-winx64
I'm using Win 10 and OS is 64 bit.
↧
MYSQL db Link to MS Access (no replies)
Hi
I need to create a Database link from a MYSQL database on a windows machine to a MS Access Database on another Windows machine that is in the same network.
Is it possible from a MYSQL database to connect to other DB's
I have setup a similar link in Oracle.
I need to do the same for the MYSQL Db and cannot find a way to do this.
Regards
I need to create a Database link from a MYSQL database on a windows machine to a MS Access Database on another Windows machine that is in the same network.
Is it possible from a MYSQL database to connect to other DB's
I have setup a similar link in Oracle.
I need to do the same for the MYSQL Db and cannot find a way to do this.
Regards
↧
MySQL ODBC 8.0 Unicode Driver and 4-Byte Emoji (no replies)
Hello.
My classic ASP website uses MySQL ODBC 8.0 Unicode Driver to work with MySQL 8.0 and its utf8mb4 tables and experiences the same problems with 4-byte emoji as descibed at https://stackoverflow.com/questions/59010774/windows-odbc-driver-retrieved-emoji-data-rendered-as :-(
Particularly, I can WRITE such emoji into the database (using INSERT SQL statements) but canNOT read them back – an ADODB.RecordSet object returns question marks (?) instead of 4-byte emoji.
Can you somehow fix the driver so that it could properly give me such emoji via an ADODB.RecordSet object? Thanks.
My classic ASP website uses MySQL ODBC 8.0 Unicode Driver to work with MySQL 8.0 and its utf8mb4 tables and experiences the same problems with 4-byte emoji as descibed at https://stackoverflow.com/questions/59010774/windows-odbc-driver-retrieved-emoji-data-rendered-as :-(
Particularly, I can WRITE such emoji into the database (using INSERT SQL statements) but canNOT read them back – an ADODB.RecordSet object returns question marks (?) instead of 4-byte emoji.
Can you somehow fix the driver so that it could properly give me such emoji via an ADODB.RecordSet object? Thanks.
↧
↧
Support of program_name attribute on ODBC connection (no replies)
Hi,
Is there a way to define the application_name/program_name on an ODBC connection?
I managed to set it via C API:
mysql_options4(*phMySql, MYSQL_OPT_CONNECT_ATTR_ADD, "program_name", "My application");
But I couldn't find the option on the ODBC Developer Guide to set it on the connection string, I tried to set it using below syntax but without success:
connectionAttributes=program_name:[APP_NAME]
If there is no such a way to define it on the connection string, is it possible to set it via a statement once the connection is established?
Best regards,
Moshe
Is there a way to define the application_name/program_name on an ODBC connection?
I managed to set it via C API:
mysql_options4(*phMySql, MYSQL_OPT_CONNECT_ATTR_ADD, "program_name", "My application");
But I couldn't find the option on the ODBC Developer Guide to set it on the connection string, I tried to set it using below syntax but without success:
connectionAttributes=program_name:[APP_NAME]
If there is no such a way to define it on the connection string, is it possible to set it via a statement once the connection is established?
Best regards,
Moshe
↧
[ODBC 5.1 Driver]Can't initialize character set utf8mb4 (path:/usr/local/mysql/share/charsets/) {HY000,NativeErr = 2019} (no replies)
Hi everyone,
I have to setup Oracle Database link from Oracle 10g DB on AIX v5.3 to a MySQL v5.7.33 Community Server Edition instance on RHEL 7.7 using unixODBC and MySQL Connector/ODBC v5.1.8.
Oracle DB is 10g running on AIX where I have unixODBC v2.3.0 and MySQL v5.1.8 installed as per Oracle note (and since that is the last available unixODBC and MySQL connector compiled package for AIX 5.3 64-bit)
I got the Oracle database link working. I am able to connect from within Oracle database sqlplus via database link to the Mysql db, but I am only able to query numeric and number like (datetime) columns, not the character data.
Oracle DB character set is AL32UTF8
MySQL DB character set is utf8
===
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[unixODBC][MySQL][ODBC 5.1 Driver]Can't initialize character set utf8mb4 (path:
/usr/local/mysql/share/charsets/) {HY000,NativeErr = 2019}
ORA-02063: preceding 2 lines from DEFAULT_ALERTNOTIFICATION
===
On my Oracle DB server with unixODBC and MySQL connector/ODBC, I found that /usr/local/mysql directory doesn't have any files for character sets.
Would any one know what did I not install correctly?
If I need to compile a package, what package can help me bring the required files in /usr/local/mysql?
Tried following in my odbc.ini DSN entry, but can't get character data queried.
CHARSET=utf8
CHARSET=latin1
CHARSET=utf8mb4
I have to setup Oracle Database link from Oracle 10g DB on AIX v5.3 to a MySQL v5.7.33 Community Server Edition instance on RHEL 7.7 using unixODBC and MySQL Connector/ODBC v5.1.8.
Oracle DB is 10g running on AIX where I have unixODBC v2.3.0 and MySQL v5.1.8 installed as per Oracle note (and since that is the last available unixODBC and MySQL connector compiled package for AIX 5.3 64-bit)
I got the Oracle database link working. I am able to connect from within Oracle database sqlplus via database link to the Mysql db, but I am only able to query numeric and number like (datetime) columns, not the character data.
Oracle DB character set is AL32UTF8
MySQL DB character set is utf8
===
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[unixODBC][MySQL][ODBC 5.1 Driver]Can't initialize character set utf8mb4 (path:
/usr/local/mysql/share/charsets/) {HY000,NativeErr = 2019}
ORA-02063: preceding 2 lines from DEFAULT_ALERTNOTIFICATION
===
On my Oracle DB server with unixODBC and MySQL connector/ODBC, I found that /usr/local/mysql directory doesn't have any files for character sets.
Would any one know what did I not install correctly?
If I need to compile a package, what package can help me bring the required files in /usr/local/mysql?
Tried following in my odbc.ini DSN entry, but can't get character data queried.
CHARSET=utf8
CHARSET=latin1
CHARSET=utf8mb4
↧
MySQL Connector/ODBC 8.0.26 is released (no replies)
MySQL Connector/ODBC 8.0.26 is released
https://dev.mysql.com/doc/relnotes/connector-odbc/en/news-8-0.html
https://dev.mysql.com/doc/relnotes/connector-odbc/en/news-8-0.html
↧
Client SSL setup (no replies)
Hello,
I have a db link in Oracle 19c on RHEL7 that connects to a 5.7.24 MySQL db using HS and the 5.2.5-8.el7 MySQL ODBC Connector. The connection works, but it doesn't use SSL. Now I want to configure a new DSN that uses SSL. The MySQL admin created a new account with the REQUIRE SSL option enabled.
It looks like I need entries for SSLCA, SSLCERT, and SSLKEY in my odbc.ini file. I looked at 6.3.3.2 Creating SSL Certificates and Keys Using openssl in the MySQL 5.7 Reference Manual, and it shows ca.pem, client-cert.pem, client-key.pem being created on the MySQL server for use on the client side. I asked the MySQL admin about getting the files to use on my server, and I was told I need to generate my own certificates.
I just want to confirm that I need to generate my own certificates using openssl on my server instead of getting them from the MySQL admin before I start looking into how to generate certificates.
Thanks,
Earl Stoyer
I have a db link in Oracle 19c on RHEL7 that connects to a 5.7.24 MySQL db using HS and the 5.2.5-8.el7 MySQL ODBC Connector. The connection works, but it doesn't use SSL. Now I want to configure a new DSN that uses SSL. The MySQL admin created a new account with the REQUIRE SSL option enabled.
It looks like I need entries for SSLCA, SSLCERT, and SSLKEY in my odbc.ini file. I looked at 6.3.3.2 Creating SSL Certificates and Keys Using openssl in the MySQL 5.7 Reference Manual, and it shows ca.pem, client-cert.pem, client-key.pem being created on the MySQL server for use on the client side. I asked the MySQL admin about getting the files to use on my server, and I was told I need to generate my own certificates.
I just want to confirm that I need to generate my own certificates using openssl on my server instead of getting them from the MySQL admin before I start looking into how to generate certificates.
Thanks,
Earl Stoyer
↧
↧
Proxy / relay / gateway for ODBC Connector (no replies)
Hi I'm new. I tried to search for an answer in the forum but I get overloaded with too many irrelavent results quoting whatever search words I use somewhere in the text. Using more specific keywords is impossible because I don't know what it's called I'm looking for.
I've a managed MySQL DB running on a shared hosting server. Mobile devices connect fine via a SSL webapp and they read and write the MySQL DB through PHP scripts which run on the same SH server.
I also have a Windows MS-Access client (the original database client) which also reads and writes to the MySQL DB via a ODBC connector though port 3306. (I believe non-SSL) This works fine too no problems and access is limited to fixed IP4 address(es).
This is what I'm looking for: I want to host a "proxy/relay/gateway/router" of some kind (on a fixed IP address I control) to work as an intermediary between the above MySQL server and an additional MS-Access client (identical except has DYNAMIC IP address). This whatever it's called does a kind of IP address translation because the second client has a dynamic IP address.
What is this 'proxy/relay/gateway' called?
I've a managed MySQL DB running on a shared hosting server. Mobile devices connect fine via a SSL webapp and they read and write the MySQL DB through PHP scripts which run on the same SH server.
I also have a Windows MS-Access client (the original database client) which also reads and writes to the MySQL DB via a ODBC connector though port 3306. (I believe non-SSL) This works fine too no problems and access is limited to fixed IP4 address(es).
This is what I'm looking for: I want to host a "proxy/relay/gateway/router" of some kind (on a fixed IP address I control) to work as an intermediary between the above MySQL server and an additional MS-Access client (identical except has DYNAMIC IP address). This whatever it's called does a kind of IP address translation because the second client has a dynamic IP address.
What is this 'proxy/relay/gateway' called?
↧
ODBC write conflict in MS Access when updating to same value (no replies)
Hi all,
I have run into a bit of an issue, I am developing / updating a program in Microsoft Access and have found that when my code tells the database to update a record to the same value that it already was it gives me the error: "This record has been changed by another user..."
Such as:
Me!pnls_rte_profiles_id = Me!pr_rte (both values equal 10)
Me.Dirty = False (this is to save the change)
I have tested using a local table in Access and a MS SQL connector to an MS database and neither have this issue.
I have also tried changing connector version, I have tried 8.0.26, 8.0.1, 5.3.14 all with the same issue.
The program previously looked at MySQL server version 5 with ODBC connector version 3.51 and did not have this issue.
Any help would be greatly appreciated, Loic
I have run into a bit of an issue, I am developing / updating a program in Microsoft Access and have found that when my code tells the database to update a record to the same value that it already was it gives me the error: "This record has been changed by another user..."
Such as:
Me!pnls_rte_profiles_id = Me!pr_rte (both values equal 10)
Me.Dirty = False (this is to save the change)
I have tested using a local table in Access and a MS SQL connector to an MS database and neither have this issue.
I have also tried changing connector version, I have tried 8.0.26, 8.0.1, 5.3.14 all with the same issue.
The program previously looked at MySQL server version 5 with ODBC connector version 3.51 and did not have this issue.
Any help would be greatly appreciated, Loic
↧
MySQL ODBC 8.0 Unicode Driver and utf8 (1 reply)
We have recently added MySQL support to our application utilizing the MySQL ODBC 8.0 Unicode Driver and we have encountered problems reading utf8 data from the database. I expect we need an additional configuration, but I have not found such. I'm hoping better experience can assist me.
We are using RHEL8 and using mysql-connector-odbc-8.0.26.1.el8,
We have configured and confirmed using the /usr/lib64/libmyodbc8w.so library,
The database schema reports being utf8mb4,
The table shows using utf8mb4,
The column shows using utf8mb4.
Using isql for testing with libmyodbc8w.so gives the exact same results as our application.
I can confirm the data in the specific column is encoded as utf8 (so the storage part is working correctly), e.g. SELECT hex(CN) from <table>; will report
\x55\x73\x65\x72\x31\x20\xC5\xA0\x76\x61\xC4\x8D (User1 Švač)
When using mysql application, SELECT CN from <table>; returns the correct utf-8 string. It appears the mysql application does not use the ODBC driver library.
When using isql with the MySQL Unicode Connector ODBC we get a string like "User1 ?va?".
The default for character_set_results reports as unset. "set character_set_results=utf8mb4" still shows the wrong string. But interestingly, using "set character_set_result=binary" will show the correct utf8 string (maybe this is a workaround?).
I've sampled MySQL Connector ODBC versions 17, 21, 25, 26 with all the same results. Windows MySQL driver ODBC also has the same problem.
If I change isql to use mariadb-connector-odbc I get the correct results.
Can anyone offer any suggestions what I might be missing?
We are using RHEL8 and using mysql-connector-odbc-8.0.26.1.el8,
We have configured and confirmed using the /usr/lib64/libmyodbc8w.so library,
The database schema reports being utf8mb4,
The table shows using utf8mb4,
The column shows using utf8mb4.
Using isql for testing with libmyodbc8w.so gives the exact same results as our application.
I can confirm the data in the specific column is encoded as utf8 (so the storage part is working correctly), e.g. SELECT hex(CN) from <table>; will report
\x55\x73\x65\x72\x31\x20\xC5\xA0\x76\x61\xC4\x8D (User1 Švač)
When using mysql application, SELECT CN from <table>; returns the correct utf-8 string. It appears the mysql application does not use the ODBC driver library.
When using isql with the MySQL Unicode Connector ODBC we get a string like "User1 ?va?".
The default for character_set_results reports as unset. "set character_set_results=utf8mb4" still shows the wrong string. But interestingly, using "set character_set_result=binary" will show the correct utf8 string (maybe this is a workaround?).
I've sampled MySQL Connector ODBC versions 17, 21, 25, 26 with all the same results. Windows MySQL driver ODBC also has the same problem.
If I change isql to use mariadb-connector-odbc I get the correct results.
Can anyone offer any suggestions what I might be missing?
↧
MySQL Connector/ODBC linked server issue with 8.0.26 Unicode Driver (no replies)
We have used the following code for 4 years to update our MYSQL database at AWS from MSSQL in our domain and now it is failing. I can select data but not update now.
UPDATE ivr
SET ivr.exported = '2021-08-11 20:18:07.0000000'
FROM OPENQUERY(SWAMPFOX, 'SELECT id, exported FROM us_apikcmorg.ivr_request') as ivr
where ivr.id = '00000518-d1ae-11e9-a5f0-06b71389f62e'
Here is the error message
OLE DB provider "MSDASQL" for linked server "SWAMPFOX" returned message "[MySQL][ODBC 8.0(w) Driver][mysqld-5.7.33-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.`ivr_request` SET `exported`=? WHERE `id`=? AND `exported`=?' at line 1".
Msg 7343, Level 16, State 4, Line 7
The OLE DB provider "MSDASQL" for linked server "SWAMPFOX" could not UPDATE table "[MSDASQL]".
UPDATE ivr
SET ivr.exported = '2021-08-11 20:18:07.0000000'
FROM OPENQUERY(SWAMPFOX, 'SELECT id, exported FROM us_apikcmorg.ivr_request') as ivr
where ivr.id = '00000518-d1ae-11e9-a5f0-06b71389f62e'
Here is the error message
OLE DB provider "MSDASQL" for linked server "SWAMPFOX" returned message "[MySQL][ODBC 8.0(w) Driver][mysqld-5.7.33-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.`ivr_request` SET `exported`=? WHERE `id`=? AND `exported`=?' at line 1".
Msg 7343, Level 16, State 4, Line 7
The OLE DB provider "MSDASQL" for linked server "SWAMPFOX" could not UPDATE table "[MSDASQL]".
↧
↧
Proxy or relay or gateway for ODBC Connector (1 reply)
Hi I'm new. I tried to search for an answer in the forum but I get overloaded with too many irrelavent results quoting whatever search words I use somewhere in the text. Using more specific keywords is impossible because I don't know what it's called I'm looking for.
I've a managed MySQL DB running on a shared hosting server. Mobile devices connect fine via a SSL webapp and they read and write the MySQL DB through PHP scripts which run on the same SH server.
I also have a Windows MS-Access client (the original database client) which also reads and writes to the MySQL DB via a ODBC connector though port 3306. (I believe non-SSL) This works fine too no problems and access is limited to fixed IP4 address(es).
This is what I'm looking for: I want to host a "proxy/relay/gateway/router" of some kind (on a fixed IP address I control) to work as an intermediary between the above MySQL server and an additional MS-Access client (identical except has DYNAMIC IP address). This whatever it's called does a kind of IP address translation because the second client has a dynamic IP address.
What is this 'proxy/relay/gateway' called?
I've a managed MySQL DB running on a shared hosting server. Mobile devices connect fine via a SSL webapp and they read and write the MySQL DB through PHP scripts which run on the same SH server.
I also have a Windows MS-Access client (the original database client) which also reads and writes to the MySQL DB via a ODBC connector though port 3306. (I believe non-SSL) This works fine too no problems and access is limited to fixed IP4 address(es).
This is what I'm looking for: I want to host a "proxy/relay/gateway/router" of some kind (on a fixed IP address I control) to work as an intermediary between the above MySQL server and an additional MS-Access client (identical except has DYNAMIC IP address). This whatever it's called does a kind of IP address translation because the second client has a dynamic IP address.
What is this 'proxy/relay/gateway' called?
↧
MySQL Connector/ODBC not using DSN password (no replies)
Hi,
I'm running macOS 11.5.2 and Excel 16.52 with iODBC 3.52.15 and then finally MySQL Connector/ODBC 8.0.26. I had to relocate the MySQL connector library from /usr/local to /Library/ODBC after installing, so the sandboxed Excel could read it, but otherwise it is working.
My issue is that I need to enter a username and password every time I connect to the database from Excel. With other MySQL connectors I was prompted, but if I just hit OK without entering anything, it would use the "user" and "password" fields from the DSN.
Are there any limitations around embedding a username and password into the DSN? It seems like I'm missing something obvious but I haven't been able to get it to connect without my typing the user/password every time.
Regards,
Jeremy
I'm running macOS 11.5.2 and Excel 16.52 with iODBC 3.52.15 and then finally MySQL Connector/ODBC 8.0.26. I had to relocate the MySQL connector library from /usr/local to /Library/ODBC after installing, so the sandboxed Excel could read it, but otherwise it is working.
My issue is that I need to enter a username and password every time I connect to the database from Excel. With other MySQL connectors I was prompted, but if I just hit OK without entering anything, it would use the "user" and "password" fields from the DSN.
Are there any limitations around embedding a username and password into the DSN? It seems like I'm missing something obvious but I haven't been able to get it to connect without my typing the user/password every time.
Regards,
Jeremy
↧
How to connect MYsql connect driver in mac os (no replies)
Please help me for making connection mysql with tableau using odbc driver in MACOS.
↧
32 bits x 64 bits (no replies)
Hello,
I need to know if I can have both 32 bits and 64 bits of ODBC installed simultaneously.
OS: Windows 10 Pro build 19043.1165
MySQL: 8.0.18
Thanks.
I need to know if I can have both 32 bits and 64 bits of ODBC installed simultaneously.
OS: Windows 10 Pro build 19043.1165
MySQL: 8.0.18
Thanks.
↧
↧
mysql-connector-odbc and ARM Architectur (no replies)
I use MacOS 11.4 arm architecture system, But I haven't found the right drive yet。 I tried the x86-64 driver for MacOS。 But it didn't work。 What should I do, please?
↧
Unable to update linked MySQL table from SQL Server with MySQL Connector/ODBC 8.0 (no replies)
I'm using a linked server on a SQL 2016 server to read and write data in different MySQL tables.
With MySQL Connector/ODBC 5.3 everything works fine, after updating the MySQL Connector/ODBC to latest version 8.0.26 due to security reasons updating the MySQL data causes an error! Selecting MySQL data still works fine, as well as inserting new data; updating and deleting MySQL data is not possible any longer.
In different threads I found hints for correct structure of MySQL tables as requirement to maintain the data via linked server. Tables must have a primary key column (with no auto increment) and at least one column with type timestamp must exist. So I created following simple test table:
CREATE TABLE `test_odbc_3` (
`TDBC_ID` int(11) NOT NULL,
`TDBC_DESC` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
`TDBC_TSU` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`TDBC_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_c
For maintenance of MySQL data I use the OPENQUERY syntax as follows:
Inserting a new row:
INSERT OPENQUERY(TDBAMYSQLTEST, 'SELECT TDBC_ID, TDBC_DESC, TDBC_TSU FROM admin_db.test_odbc_3')
VALUES (24,'row 4','2019-05-19 14:22:41)
works fine!
Selecting all rows:
SELECT *
FROM OPENQUERY( TDBAMYSQLTEST, 'SELECT TDBC_ID, TDBC_DESC, TDBC_TSU FROM admin_db.test_odbc_3')
works fine – result is:
TDBC_ID TDBC_DESC TDBC_TSU
21 row 1 2009-04-17 14:11:41.0000000
22 row 2 2009-04-17 14:11:41.0000000
23 row 3 2009-04-17 14:11:41.0000000
24 row 4 2019-05-19 14:22:41.0000000
Trying to update a row in this table causes the following error:
UPDATE OPENQUERY( TDBAMYSQLTEST, 'SELECT TDBC_ID, TDBC_DESC, TDBC_TSU FROM admin_db.test_odbc_3 WHERE TDBC_ID = 23')
SET TDBC_DESC = 'mydesc'
WHERE TDBC_ID = 23
Msg 7343, Level 16, State 4, Line 10
The OLE DB provider "MSDASQL" for linked server "TDBAMYSQLTEST" could not UPDATE table "[MSDASQL]". Unknown provider error
Based on different threads I checked and set the configuration of environment as well.
Driver is: MySQL ODBC 8.0 Unicode Driver (8.00.26.00)
Connector: Set option 'return matched rows instead of affected rows'
Enabled Provider Options:
Dynamic parameter
Nested queries
Level zero only
Allow inprocess
Index as access path
Linked Server Properties set to True:
Data Access
RPC
RPC Out
Anybody has an idea about how to get running with update MySQL data again? Thnx in advance for any help!
With MySQL Connector/ODBC 5.3 everything works fine, after updating the MySQL Connector/ODBC to latest version 8.0.26 due to security reasons updating the MySQL data causes an error! Selecting MySQL data still works fine, as well as inserting new data; updating and deleting MySQL data is not possible any longer.
In different threads I found hints for correct structure of MySQL tables as requirement to maintain the data via linked server. Tables must have a primary key column (with no auto increment) and at least one column with type timestamp must exist. So I created following simple test table:
CREATE TABLE `test_odbc_3` (
`TDBC_ID` int(11) NOT NULL,
`TDBC_DESC` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
`TDBC_TSU` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`TDBC_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_c
For maintenance of MySQL data I use the OPENQUERY syntax as follows:
Inserting a new row:
INSERT OPENQUERY(TDBAMYSQLTEST, 'SELECT TDBC_ID, TDBC_DESC, TDBC_TSU FROM admin_db.test_odbc_3')
VALUES (24,'row 4','2019-05-19 14:22:41)
works fine!
Selecting all rows:
SELECT *
FROM OPENQUERY( TDBAMYSQLTEST, 'SELECT TDBC_ID, TDBC_DESC, TDBC_TSU FROM admin_db.test_odbc_3')
works fine – result is:
TDBC_ID TDBC_DESC TDBC_TSU
21 row 1 2009-04-17 14:11:41.0000000
22 row 2 2009-04-17 14:11:41.0000000
23 row 3 2009-04-17 14:11:41.0000000
24 row 4 2019-05-19 14:22:41.0000000
Trying to update a row in this table causes the following error:
UPDATE OPENQUERY( TDBAMYSQLTEST, 'SELECT TDBC_ID, TDBC_DESC, TDBC_TSU FROM admin_db.test_odbc_3 WHERE TDBC_ID = 23')
SET TDBC_DESC = 'mydesc'
WHERE TDBC_ID = 23
Msg 7343, Level 16, State 4, Line 10
The OLE DB provider "MSDASQL" for linked server "TDBAMYSQLTEST" could not UPDATE table "[MSDASQL]". Unknown provider error
Based on different threads I checked and set the configuration of environment as well.
Driver is: MySQL ODBC 8.0 Unicode Driver (8.00.26.00)
Connector: Set option 'return matched rows instead of affected rows'
Enabled Provider Options:
Dynamic parameter
Nested queries
Level zero only
Allow inprocess
Index as access path
Linked Server Properties set to True:
Data Access
RPC
RPC Out
Anybody has an idea about how to get running with update MySQL data again? Thnx in advance for any help!
↧
Mixing ODBC / Server Versions? (no replies)
2 databases, one on MySQL Server 5.6 and one on 8.0.
We need both ODBC connectors on each client.
Is this possible?
We need both ODBC connectors on each client.
Is this possible?
↧