Delphi - MySQL Best Data aware components to use

别来无恙 提交于 2019-12-10 18:52:20

问题


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


回答1:


@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

Password Hashing in MySQL




回答2:


Try AnyDAC, it offers great support for MySQL, among other supported DBMS's. The main features are:

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



回答3:


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 MicroOLAP MySQL Delphi Direct Access Components which is under 300 US$.




回答4:


I would recommend MyDac from Devart ( previously known as Core Lab ).

Also check out their UniDac solution for multiple databases.




回答5:


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.

http://www.justsoftwaresolutions.co.uk/delphi/dbexpress_and_mysql_5.html



来源:https://stackoverflow.com/questions/2694412/delphi-mysql-best-data-aware-components-to-use

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!