evassvag
asked on
Need help debugging a very slow Mysql ODBC connection
I have Delphi application that access MySQL 5.1 installed on Linux. We are using MySQL ODBC 5.1 Driver. This application works fine on our XP clients but not on a new windows 7 machine. The connection is very slow, a simple task takes 10 seconds, and it should take just a few milliseconds. I have installed Mysql Workbench and it is working perfect from the win 7 machine.
This is the connection string I use:
con.ConnectionString :=
'DRIVER={MySQL ODBC 5.1 Driver};'
+ 'SERVER=' + server.text + ';'
+ 'PORT=3306;'
+ 'DATABASE=' + database.text + ';'
+ 'User=' + username.text + ';'
+ 'PASSWORD=' + password.text + ';'
+ 'OPTION=3;';
con = TADOConnection
Please note that I have no problem with establishing a connection, the problem is the long response time after the connection is established.
I have removed Norton, no change.
This is the connection string I use:
con.ConnectionString :=
'DRIVER={MySQL ODBC 5.1 Driver};'
+ 'SERVER=' + server.text + ';'
+ 'PORT=3306;'
+ 'DATABASE=' + database.text + ';'
+ 'User=' + username.text + ';'
+ 'PASSWORD=' + password.text + ';'
+ 'OPTION=3;';
con = TADOConnection
Please note that I have no problem with establishing a connection, the problem is the long response time after the connection is established.
I have removed Norton, no change.
Run the application as administrator
ASKER
I was already running it as administrator
Try to set firewall settings, reset exceptions property (port, IP, program)
try to uninstall Mysql Workbench, restart, reinstall mysql odbc, then try the connection.
ASKER
I uninstalled workbench, no change in speed after booting. I reinstalled mysql odbc, no change. I uninstalled mysql odbc and got an error message as expected. I then installed mysql-connector-odbc-5.1.8 -winx64 (complete). I booted and then connected but still slow.
I guess it's a network configuration problem of win7, follow this steps;
At the command prompt, type the following command, and then press ENTER:
netsh interface tcp set global autotuninglevel=disabled
If it does not work;
Set this to your win7 Lan Card device driver;
Large Send Offload v2 (IPv4) - Disable
Large Send Offload v2 (IPv6) - Disable
Procedure;
- Start Menu -> Control Panel
- Network and Internet
- Network and Sharing Center
- Choose Local Area Connection
near the top on the right;
- Press "Properties" button
- Press "Configure" button
- Pick "Advanced" tab
At the command prompt, type the following command, and then press ENTER:
netsh interface tcp set global autotuninglevel=disabled
If it does not work;
Set this to your win7 Lan Card device driver;
Large Send Offload v2 (IPv4) - Disable
Large Send Offload v2 (IPv6) - Disable
Procedure;
- Start Menu -> Control Panel
- Network and Internet
- Network and Sharing Center
- Choose Local Area Connection
near the top on the right;
- Press "Properties" button
- Press "Configure" button
- Pick "Advanced" tab
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
noted
ASKER
* Please state your reason for accepting your own comment as the solution.
It solved the problem
It solved the problem