58420

Delphi - MySQL Best Data aware components to use

Question:

I need my application to connect to my web server's MySQL database, what is the best option for this. Perfered Data aware Component.

I tried zeos 7, but I keep getting the error: SQL error: Client does not support authentication protocol requested by server; consider upgrading MySQL client and have not been able to fix it.

Thanks

-Brad

Answer1:

@Brad the ZEOS components are an excellent alternative for connect to MySQL, you have that error because you are using an older version of MySQL client. MySql 4.1 introduces a new password hashing algorithm, for fix this issue you have 2 options.

1) Change your MySQL client to use a 4.1.1 or newer client library.

2) use the the OLD_PASSWORD function

you must run this script in your mysql server.

SET PASSWORD FOR 'user' = OLD_PASSWORD('password'); FLUSH PRIVILEGES;

check this link for more info

<a href="http://dev.mysql.com/doc/refman/5.1/en/password-hashing.html" rel="nofollow">Password Hashing in MySQL</a>

Answer2:

Try <a href="http://www.da-soft.com/anydac/" rel="nofollow">AnyDAC</a>, it offers great support for MySQL, among other supported DBMS's. The main features are:

<ul><li>High speed. </li> <li>Normal and Embedded servers. </li> <li>SSL connections. </li> <li>Full range of data types, including ENUM, SET. </li> <li>UTF8 and ANSI character encodings. </li> <li>AUTO_INCREMENT columns. </li> <li>Full support for MySQL 5 stored procedures. </li> <li>Batch commands with multiple result sets. </li> <li>Query execution aborting.</li> </ul>

Answer3:

Not sure if it's the best but I've used ADO components (TADOQuery, TADOConnection... Look in the dbGo palette) with success in many Delphi projects in the past to connect to MySQL. It's "free" as it's already bundled with Delphi.

On a side note, your Web host must allow "foreign" connections (not just through "localhost") to their MySQL server.

There is also <a href="http://www.microolap.com/products/connectivity/mysqldac/" rel="nofollow">MicroOLAP MySQL Delphi Direct Access Components</a> which is under 300 US$.

Answer4:

I would recommend <a href="http://www.devart.com/mydac/" rel="nofollow">MyDac</a> from Devart ( previously known as Core Lab ).

Also check out their <a href="http://www.devart.com/unidac/" rel="nofollow">UniDac</a> solution for multiple databases.

Answer5:

I assume from your message tags that you're using Delphi 2009. DbExpress has come a long way and comes with Delphi. There's a lot of support for it on the web these days. If you're not using Delphi 2009, DbX is available since version 6.

I think the Delphi 2009 version of DbX supports MySQL 5.0. If not, you need an updated DbX driver. You can get an open source driver here.

<a href="http://www.justsoftwaresolutions.co.uk/delphi/dbexpress_and_mysql_5.html" rel="nofollow">http://www.justsoftwaresolutions.co.uk/delphi/dbexpress_and_mysql_5.html</a>

Recommend

  • How to reference a JavaScript file in Lib from an HTML file in Data?
  • Postgresql & psycopg2: database does not exist
  • How to import data to a specified tablespace
  • Detect which app has been launched in android
  • How to use Xcode Extract refactoring feature?
  • How to export Selenium Test Suite/Case as C#
  • Playing a monetized YouTube song inside of a Google Chrome Extension. Do I have any options?
  • How to handle empty space in url when downloading image from web?
  • Java Application vs. Java Desktop Application in Netbeans [duplicate]
  • How to Save JSON data to SQL server database in C#?
  • New Firebase failed: First argument must be a valid firebase URL and the path can't contain “.”
  • JSON encode and decode on PHP
  • Building Qt project for C++11 standard
  • MYSQ & MVC3 SQL connection error \\ ProviderManifestToken but I am using MySQL
  • Authentication in Play! and RestEasy
  • How to view images from protected folder with php?
  • Webgrid not refreshing after delete MVC
  • Is there a way to do normal logging with EureakLog?
  • PHP buffered output depending on server setting?
  • MongoError: Incorrect arguments
  • Moving mysql files across servers
  • Jquery UI tool tip close icon
  • Django rest serializer Breaks when data exists
  • How to avoid particles glitching together in an elastic particle collision simulator?
  • How to rebase a series of branches?
  • Recording logins for password protected directories
  • Splitting given String into two variables - php
  • Check if a string to interpolate provides expected placeholders
  • How to check if every primary key value is being referenced as foreign key in another table
  • Traverse Array and Display in markup
  • Comma separated Values
  • How to set the response of a form post action to a iframe source?
  • Change div Background jquery
  • Qt: Run a script BEFORE make
  • Authorize attributes not working in MVC 4
  • Busy indicator not showing up in wpf window [duplicate]
  • reshape alternating columns in less time and using less memory
  • UserPrincipal.Current returns apppool on IIS
  • Python/Django TangoWithDjango Models and Databases
  • Net Present Value in Excel for Grouped Recurring CF