Quantcast
Channel: MySQL Forums - Connector/ODBC
Viewing all 1136 articles
Browse latest View live

Access loses its connection/authentication to the MySQL database (randomly requests username password) (5 replies)

$
0
0
I have an Access 2002 Database running on Microsoft Server 2003 with MySQL OBDC connector version 5.1 linking to an offsite MySQL database.

For a couple of years, it ran perfectly. I could close and open the Access application and it would always have access to the tables in the MySQL database. Never a problem or a glitch. Never asked for the username or password since the day I created the connection to the MySQL database.

One day in the middle of its nightly operations it displays the login screen asking for the MySQL username and password to be filled in. (suspending its operation) In the morning I would type it in, and it would continue on. From that day on, it randomly pops the MySQL username and password connect screen as well as every time I restart the Access application.

Nothing that I know of on my end changed so I assume it was something on the other end. A new version of MySQL server or a setting change? Does anyone have and idea as to what might have changed?

This is driving me crazy as it is randomly preventing some mission-critical maintenance from happening overnight.

ODBC Connector 8.0 For MySQL 5.7.20 - Bad Handshake error (no replies)

$
0
0
Using ODBC 8.0 to create linked server for MySQL 5.7.20. There is error message as:

OLE DB provider "MSDASQL" for linked server "MYSQL" returned message "[MySQL][ODBC 8.0(a) Driver]Bad handshake".

Bad handshake took my long time and still not resolved. Let me know if it is product bug.

Thanks
Neeraj

Mysql 8.0.12 for Excel 16.16.2 in Macbook (1 reply)

$
0
0
I need to get a connection from ms-excel 16.16.2 to my local mysql server 8.0.12, to import and append data in the mysql database easily using ms-excel.

Kindly help me with the procedure for the MacBook Air.

Question marks instead of data in linked views (MS Access) (no replies)

$
0
0
Hello,
When I create linked views (MYSQL queries) - I see question marks instead of data. If I do the same for the table, everything is OK. If I import a table or view, everything is OK, if I want to make the view as a linked table, it fails.
MS Access newest. ODBC drivers tested all.
Please help!

MySQL ODBC slow driver with windows 10 (no replies)

$
0
0
Hi, is it known a problem of mysql or the related odbc driver with windows 10?
Let me explain: I have created an ASP site that accesses a db mysql. By accessing the on-line site, posted on a remote server with windows server 2008 R2 entreprise, the speed is more than acceptable.
The host is "localhost" because the database is on the same server as the site.
I HAVE THE SAME PERFORMANCES when I was running the same site IN LOCAL, using a PC with WINDOWS 7.
Now that I switched to a PC with WINDOWS 10, everything has changed: running the site locally, always with the db in local, the connection and the db queries are 4-5 times slower!
I repeat, same site performed on a remote web server with windows server 2008, everything is OK. I am going crazy!
The Web Server is always IIS, even if the versions are different, of course, of the remote server compared to my PC.
So, kindly, no one comes to tell me that asp, mysql and IIS are not performing! The online site is a bomb!
Now I have an even more respectable PC: AMD processor A 12, 12 GB Ram, Windows 10 Home: on the other hand, I repeat, the site online works very fast. It is performed locally which is slow!
I also installed the latest version of the MySQL ODBC driver, 8.0, but nothing.
Can someone help me? Thank you.

ROW_COUNT() returns 0 on INSERT with MySQL ODBC 8.0.12 (no replies)

$
0
0
I recently switched my application (C++) to use the latest MySQL ODBC connector 8.0.12 from ODBC 3.51. After the switch, I found out that ROW_COUNT() always return 0 on updates. For example, in my application, it inserted a new row to a table (I verified that the row was inserted), then using the same db connection object, it immediately did a "select ROW_COUNT()". The query returned 0 instead of 1. If I switched back to ODBC 3.51 and tried the same thing, it would return 1. I couldn't find any report on this issue. Any insight is greatly appreciated. Thanks!

Test with auth_test_plugin (no replies)

$
0
0
I am using MySQL 5.6.30, and try to use auth_test_plugin.
The plugin is installed correctly, and I create a user as below:

CREATE USER jtest1 IDENTIFIED WITH test_plugin_server AS '123';

then connect to the server through MySQL ODBC connector 5.6.30 with the connection string with "plugin_dir" option as below:
DRIVER={MySQL ODBC 5.3 ANSI Driver};server=localhost;port=<port>;uid=jtest1;pwd=123;plugin_dir=<the location of the plugin>

The plugin is in work. The client & server side function all return CR_OK. But the logging in is denied, the error message says:

ODBC SQLSTATE=HY000 Native error=1045, message=[MySQL][ODBC 5.3(a) Driver]Access denied for user 'jtest1'@'localhost' (using password: YES)

What's the problem in it.

MySql ODBC driver disconnect very slow on Windows (no replies)

$
0
0
We are using mysql connecter 5.3.10 with a third party application on Windows. I am noticing that the ODBC driver SQLDisconnect call is very slow taking sometimes hours to complete. It's spending most of the time in the stack below (multiple threads). If we use SSLMODE=DISABLED in the connection string it's pretty quick. Any idea what could be going on?

00 myodbc5w!yaSSL::input_buffer::get_remaining+0x4 [g:\ade\build\sb_0-26514852-1514435511.83\mysql-5.7.21\extra\yassl\src\buffer.cpp @ 146]
01 myodbc5w!mySTL::for_each<mySTL::list<yaSSL::input_buffer * __ptr64>::iterator,yaSSL::yassl_int_cpp_local1::SumData>+0x29 [g:\ade\build\sb_0-26514852-1514435511.83\mysql-5.7.21\extra\yassl\taocrypt\mystl\algorithm.hpp @ 49]
02 myodbc5w!yaSSL::SSL::bufferedData+0x23 [g:\ade\build\sb_0-26514852-1514435511.83\mysql-5.7.21\extra\yassl\src\yassl_int.cpp @ 1182]
03 myodbc5w!yaSSL::SSL::fillData+0x6d [g:\ade\build\sb_0-26514852-1514435511.83\mysql-5.7.21\extra\yassl\src\yassl_int.cpp @ 1194]
04 myodbc5w!yaSSL::receiveData+0x7e [g:\ade\build\sb_0-26514852-1514435511.83\mysql-5.7.21\extra\yassl\src\handshake.cpp @ 1061]
05 myodbc5w!yaSSL_read+0x3c [g:\ade\build\sb_0-26514852-1514435511.83\mysql-5.7.21\extra\yassl\src\ssl.cpp @ 364]
06 myodbc5w!vio_ssl_read+0x2a [g:\ade\build\sb_0-26514852-1514435511.83\mysql-5.7.21\vio\viossl.c @ 186]
07 myodbc5w!net_read_raw_loop+0x42 [g:\ade\build\sb_0-26514852-1514435511.83\mysql-5.7.21\sql\net_serv.cc @ 675]
08 myodbc5w!net_read_packet_header+0x1f [g:\ade\build\sb_0-26514852-1514435511.83\mysql-5.7.21\sql\net_serv.cc @ 765]
09 myodbc5w!net_read_packet+0x25 [g:\ade\build\sb_0-26514852-1514435511.83\mysql-5.7.21\sql\net_serv.cc @ 822]
0a myodbc5w!my_net_read+0x1e [g:\ade\build\sb_0-26514852-1514435511.83\mysql-5.7.21\sql\net_serv.cc @ 900]
0b myodbc5w!cli_safe_read_with_ok+0xa4 [g:\ade\build\sb_0-26514852-1514435511.83\mysql-5.7.21\sql-common\client.c @ 1055]
0c myodbc5w!flush_one_result+0x1d [g:\ade\build\sb_0-26514852-1514435511.83\mysql-5.7.21\sql-common\client.c @ 1397]
0d myodbc5w!cli_flush_use_result+0x15 [g:\ade\build\sb_0-26514852-1514435511.83\mysql-5.7.21\sql-common\client.c @ 1476]
0e myodbc5w!mysql_free_result+0x52 [g:\ade\build\sb_0-26514852-1514435511.83\mysql-5.7.21\sql-common\client.c @ 1626]
0f myodbc5w!free_current_result+0x5a [g:\ade\build\sb_0-26796952-1516358212.03\mysql-connector-odbc-5.3.10-src\driver\my_stmt.c @ 84]
10 myodbc5w!next_result+0xe [g:\ade\build\sb_0-26796952-1516358212.03\mysql-connector-odbc-5.3.10-src\driver\my_stmt.c @ 290]
11 myodbc5w!my_SQLFreeStmtExtended+0xce [g:\ade\build\sb_0-26796952-1516358212.03\mysql-connector-odbc-5.3.10-src\driver\handle.c @ 639]
12 myodbc5w!free_connection_stmts+0x32 [g:\ade\build\sb_0-26796952-1516358212.03\mysql-connector-odbc-5.3.10-src\driver\connect.c @ 941]
13 myodbc5w!SQLDisconnect+0x21 [g:\ade\build\sb_0-26796952-1516358212.03\mysql-connector-odbc-5.3.10-src\driver\connect.c @ 964]
14 ...

Write performance problems with MySql and MariaDb (1 reply)

$
0
0
Hello. Although the text below refers to MariaDb, this has also been tested with a recent version of MySql with identical results. Any help would be appreciated:

I am having serious insert and update problems with MariaDB version 10.0.17. Here is our environment:
“Server”:
* Dell Optiplex 3010, 4GB, 250GB, Windows 7 SP1 (64 bit), gigabit ethenet
* MariaDB 10.0.17 (32 bit)
* .Net Framework 4.5.2
Client:
* Dell Optiplex 3010, 4GB, 250GB, Windows 7 SP1 (64 bit), gigabit ethernet
* MS Access 2010 (32 bit)
* MariaDB ODBC 3.0 Driver (32 bit)
* MySql Connector Net 6.9.12
* Visual Studio 2012
* .Net Framework 4.5.2
The MariaDB installation used all defaults (InnoDB, UTF8, etc. ). There is basically no load on the server and 40% of the memory is unused. I created a couple of tables for test purposes. The main table has an integer id number as PK, last name, first name, integer status, entry date. The last name column is indexed and the status field is a foreign key for a small (20 rows) lookup table. There are just under 11,000 records in the existing text file. I tried several load methods for the data: MS Access linked table (ODBC, all defaults) , MS Access VBA DAO recordset (ODBC), MS Access ADODB recordset (ODBC), C# MySql .Net 6.9.12 adapter (all defaults), MySql.exe with input SQL file, and finally, the MariaDB MySqlImport.exe.
The server has no other applications running on it and there is plenty of free disk space. There is very little other network activity and the two machines are connected to gig-e ports in a switch.
The loads for all the MS Access methods are only inserting or updating around 33 records per second. The last C# attempt was even slower: 20 records per second. Before trying the MySqlImport, I assumed a network problem. However, I tried the following query in VBA (both ADODB and DAO) and in C#:
SELECT ResidentId, LastName, FirstName, EntryDate, ResidentStatus
FROM Residents INNER JOIN ResidentStatuses
ON Residents.ResidentStatusId=ResidentStatuses.ResidentStatusId;
This query took just over a tenth of a second in all the environments.
I then tried the following statement in VBA, C# and MySql.exe:
UPDATE residents SET lastname = concat(lastname,'_1');
This took over 500 seconds in VBA and C# but only one half second in MySql.
I then truncated the table and used MySqlImport (running on the CLIENT, with the text load file also on the client) and loaded the table. All 11,000 records took only 2 seconds to load. Therefore, I know this is not a network or disk I/O problem. Honestly, I didn’t expect good performance using ODBC but I wouldn’t have expected it to be this bad. What really surprised me was the C# insert/update performance. I figured using reasonably recent .Net drivers would be pretty fast. I would appreciate any suggestions.
Also, I really would like to avoid using ODBC if possible. Unfortunately, we have to be able to access the MariaDB databases from 32 bit Access 2010 as well as C#. The environment we are in is very much locked down so upgrading the OS or MS Office is out of the question. (I wouldn’t have chosen to install 32 bit Office on a 64 bit OS.) Obviously, the performance problem is the priority here, but I would also appreciate it if anyone could point me to some non-ODBC driver I can use to connect in Access VBA with ADODB.
Thanks in advance.

Here are the methods and stats used to insert the records:
1. mysqlimport -h85.85.18.99 -P3333 -L -v -udba -p ged c:\users\lab\documents\residents.txt
Time: 00:02.25 (4862 inserts/sec) Network usage: ?? Kbps
2. mysql –h85.85.18.99 –P3333 –udba –Dged –p < c:\users\lab\documents\residents.sql
Time: 04:46 (38 inserts/sec) Network usage: 65Kbps
3. C# 2012 with MySql .Net adapter 6.9.12 using dataadapter.update(datatable)
Time: 04:56 (36 inserts/sec) Network usage: 75Kbps
4. MS Access 2012 (32 bit) VBA DAO recordset (ODBC; MariaDB 3.0 ODBC Driver)
Time: 05:01 (35 inserts/sec) Network usage: 328Kbps
5. MS Access 2012 (32 bit) VBA ADODB recordset (ODBC; MariaDB 3.0 ODBC Driver)
Time 07:57 (23 inserts/sec) Network usage: 215Kbps

Sqlpassthru error after update to Mysql 8 (2 replies)

$
0
0
Dear,

Could someone help me?

i have Sqlpassthru as below:
eg.

SqlCommand="Select * from Table_a where Key1=?Param_1 and Key2=?Param_2"

After i update to mysql 8 (from 5.8) it suddenly not working, it return 0 result, supposed to return 1 record. the connection is 1 (success), but seems the parameter is not working.

i try around like this :

SqlCommand="Select * from Table_a where Key1='"+Param_1 +"' and Key2='"+Param_2+"'"

suddenly it work normal.
Is there any thing i should change/set ?
i'm not able to change the code all.

Thanks in advance.

Connecting to MySQL database (no replies)

$
0
0
Hi,
I'm using tableau to connect to my datasbase in MySQL. I am receiving the following error and am wondering if I need to update something in MySQL. My server is up and running and can connect to it from the computer the software and the server are loaded onto together.

Unable to connect to the ODBC Data Source. Check that the necessary drivers are installed and that the connection properties are valid.
[MySQL][ODBC 8.0(w) Driver]Can't connect to MySQL server on 'XX.XX.XXX.XX' (10060)
Unable to connect to the server "XX.XX.XXX.XX". Check that the server is running and that you have access privileges to the requested database.

macOS Connector/ODBC could not be loaded in Excel for Mac 2016 (no replies)

$
0
0
I am working with Excel for Mac Version 16.18 on High Sierra 10.13.6. Installed Connector/ODBC 8.0.12 for macOS, tested the connection to my database with iODBC Data Source Administration (64-Bit) and worked. I get the message DSN: myodbca, The connection DSN was tested successfully, and can be used at this time.

When I try connecting with Excel with the save driver and credentials I get the following error IM003: [iODBC][Driver Manager]Specified driver could not be loaded.

Same problem with both, Unicode and ANSI drivers.

Prepared statements (server) return no results, client statements work (no replies)

$
0
0
Hello,
We have a C application using ODBC drivers to communicate with a Linux MySQL installation. When SQLExecDirect running a "select * from "USERS" where ("USER" = ?) ; statement with a bound variable string with a value of "MANAGER" the subsequent SQLFetch returns SQL_NO_DATA.
However, switching the "Prepare statements on the client" ON in the driver results in a single row being returned.
Packet monitoring on the Linux box shows that the request is correctly sent in both cases. It shows the first case preparing/responding/executing/responding as expected. In the second case is shows the pre-substituted statement being executed and responding with the same result.


One minor difference between the two executions is that the response to the server side execution is two bytes longer. Wiresahark does report "EOF Marker found while connection in wrong state." Which may or may not have something to do with the client not interpreting the result. I have found little documentation on "client_deprecate_eof" setting which apparently may have an impact. Neither is there any great deal of documentation as to why/when "Prepare statements on the client" should be used.


Any pointers / further investigation areas would be greatly appreciated.

-------------------------

mysql Ver 14.14 Distrib 5.7.24, for Linux (x86_64)
ODBC driver Windows 5.03.11.00 or 8.00.13.00 Oracle Corporation

MYSQL ODBC 8.0.13 does not show all the query records of a linked view mysql + access (no replies)

$
0
0
I have an access application that works with MYSQL 8.0.13 where the office documents are registered for years. At the start of the session, a year to consult is selected (2018) and the value is saved in a tempvars for a later consultation.
Then it goes to another form where I have a subform that should show the records of the chosen year (in this case 2018), but it does not show all the records to the current date (they are more than 3500 records) it only shows me about 700 first records They are until the month of April
When starting session with previous years (2017,2016,2015 etc.) if it works well and shows all records as appropriate
- the main table records are more than 11,000
- I have tried installing ODBC from previous versions and it works well with version of ODBC 5.2.7, it shows me all the records until November
--The problem is that the ODBC 5.2.7 does not work with the new security measures of the MYSQL version 8.0.13

I suppose this is an error of the current driver 8.0.13, if so there will be some solution.

Thanks in advance for any suggestion or contribution.

Error setting up ODBC connection to Powerbuilder 7.0 (no replies)

$
0
0
Hi,
I set up a 32 bit ODBC connection to MySQL Server within Powerbuilder 7.0. I tried both ANSI and Unicode and received this error in both when I ran a select * on a table in Powerbuilder

Select error: SQLSTATE 22018
[MySQL][ODBC 8.0(w) Driver][mysqld-5.7.24-log]

The error with a select * results in not all records being extracted.

I identified the culprits where the error is triggered, a varchar[500] field and a mediumtext (containing JSON) field.

So if I select all but those 2 fields all records are extracted.

I looked at the data and do not see what is causing the problem.

Interesting querying in DESC order extracted nothing:

select id, displaydescription from actions
order by id DESC;

Does anyone have any idea what the issue can be?

I appreciate your time and help!
Annie

Optimization of application to reduce db workload and improve performance (4 replies)

$
0
0
We have built an application, which runs on 40 virtual boxes (VMs) in parallel. Each virtual box performs certain tasks. The tasks are defined and prioritized though a MySQL database table. The table contains all tasks and documents, when they are done.

Thus the table looks as follows:
Row1: Task1 Priority = 1 Status = done
Row2: Task2 Priority = 1 Status = done
Row3: Task3 Priority = 1 Status = done
Row4: Task4 Priority = 1 Status = work in progress
Row5: Task5 Priority = 2 Status = work in progress
Row6: Task6 Priority = 6 Status = to do
Row7: Task7 Priority = 3 Status = to do
...
Row2,500,00: Task2,500,000 Priority = 5 Status = to do

The virtual boxes contain applications, which connect through ODBC to the database/ table.

At the moment each VM
1) catches the next available task (SELECT Row FROM ToDoList WHERE Status = "to do" ORDER BY Row LIMIT v, 1) (v = number of VM)
2) blocks the task (UPDATE ToDoList SET Status = "work in progress" WHERE Row = Rowx)
3) documents, that the task was done successfully or sets it back, if there was an error (UPDATE ToDoList SET Status = "done" WHERE Row = Rowx or ... Status = "to do" (if the task failed))

We have some performance problems. It's unclear, whether they are due to the application as such (nothing to do with ODBC or MySQL), OBDC or MySQL.

My ideas were:
1) Instead of having one large to do list, I would have a master to do list and synchronize once a day with a shorter list. The applications just run 6 a.m. to midnigth. Thus I could replicate after midnight and write the daily workload (around 40,000 tasks) to a smaller table. The smaller table would be created daily and wouldn't include tasks already done.

2) Maybe there is something wrong with the indexes of the table. Which indexes should it have? I currently have (Status, Priority), (Row) and (Priority)

3) Sometimes I see, in PHPMyAdmin, that the table is locked. Maybe I should do 1) and split the smaller table into 40 tables, so the VMs can work with one table each.

4) Maybe it is mainly an ODBC problem. I could retrieve more than 1 task, block multiple tasks and finally write the results for all tasks (use LIMIT 10*v, 10) in the first SQL statement

What do you think? I don't want to do things, which don't make sense, but create efforts. With 2,500,000 rows, if I use PHPMyadmin, the first SQL statement requires (as per PHPMyadmin) 0.004 seconds. Thus I don't see much need to further improve it. What about the 4th idea? Could ODBC be the problem and would ths fix it? Any other ideas? Comments to the ideas?

MySQL Workbench on hard drive but MySQL Server on network so team can access via ODBC? (no replies)

$
0
0
Hi,

Is it possible to have MySQL Server on our network while keeping MySQL Workbench, MySQL Utilities, MySQL Shell, and MySQL Router on the hard (c:) drive in order for my colleagues to access the data through an ODBC connection (within PowerBuilder 7.0)?

I have the ODBC connection working locally without issues. But my colleagues need to access the data too.

I am not sure if it is just a simple matter of modifying my.ini to specify the new (network) location or if there is other work that would be needed OR if I need to move all of MySQL to the network (?)

~~~~~~~~~~~~~~~~~~~~~~~~
The my.ini file (located locally at C:\ProgramData\MySQL\MySQL Server 5.7) has some instructions:

# On Windows you should keep this file in the installation directory
# of your server (e.g. C:\Program Files\MySQL\MySQL Server X.Y). To
# make sure the server reads the config file use the startup option
# "--defaults-file".
#
# To run the server from the command line, execute this in a
# command line shell, e.g.
# mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini"
~~~~~~~~~~~~~~~~~~~~~~~~

So that sounds like I also need my.ini on the network too.

I know I can try this and see if it works, but thought to ask the community if there are any known issues that might arise should I do this.

Thank you for your help and I hope your day is a good one,

MySQL 5.2 ODBC Driver is slow, needs to use 5.1 to be fast (no replies)

$
0
0
Hi All,

I'd just like to ask for your expertise re: this problem I'm having.

I'm connecting to a MySQL Server 5.6 using ODBC over Linux, DG4ODBC from Oracle Database.

When the Oracle Gateway uses the MySQL 5.1.13 Driver (only comes in Unicode, I think), the queries execute within reasonable time.

When I use the MySQL 5.2.7 Driver (either Unicode or ANSI), the same queries take up to 5 times longer to execute.

All other variables are held constant in this case when testing.

My DSN setup in Linux is fairly simple:
SERVER, PORT, DATABASE, USER and PASSWORD are all defined, of course
CHARSET = UTF8 (if not set, the Oracle DB acts up)
OPTION = by default I am using '3', but even without using any option, the following persists.

Is there any logical reason for this?
I can't try 5.3 at the moment as I'm running Red Hat 5 64bit and the 5.3 isn't provided for this version of the OS.

Many thanks and happy holidays to everyone! :)

Mark

ODBC connect to MySQL 5.1.73 on NAS works but fails in MS Access (no replies)

$
0
0
Hello,

I´m trying to uses Microsoft Access (latest Office 365 version, x64) in order to connect to a mysql 5.1.73 database running on my NAS (Zyxel NAS326). 5.1.73 is the latest version available.
I´m using "mysql-connector-odbc-5.3.11-winx64" - version 8.x is not working - "bad handshake error".
I can create an ODBC Data Source (MySQL ODBC 5.3 ANSI Driver), which connects perfectly to the database - test is successful (using port 3306).
I can create an ODBC connection in MS Access- after openig a table in Access, database entries are shown, but after some seconds of scrolling trough the table, I get "ODBC connection failed" errors. Instead of the database entries, I see "#Name?" (language is German). I can´t create queries - "ODBC connection failed".
Ideas, please?

Oracle to MYSQL database link Out-Of-Memory (no replies)

$
0
0
Hello Team,

Happy New Year 2019!

when querying a table with 3.5 billion records from Oracle to MYSQl databsase using database link, I am getting error below

SQL> create table bireport.data_charging2018 as (select * from mt.data_charging2018@bikwik);
create table bireport.data_charging2018 as (select * from mt.data_charging2018@bikwik)
*
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[MySQL][ODBC 8.0(a) Driver][mysqld-5.5.24]MySQL client ran out of memory
{HY000,NativeErr = 2008}
ORA-02063: preceding 2 lines from BIKWIK


Oracle database platform: Linux 6
SQL platform: Windows server 2008 R2

Please advise.

Regards,

Roshan
Viewing all 1136 articles
Browse latest View live