简体   繁体   English

在Delphi中连接Mysql数据库的最佳方法是什么?

[英]What is the best way to connect to a Mysql database in Delphi

在Delphi中连接到Mysql 5.1.x时使用的最佳组件是什么?为什么?

No other DB components could beat DevArt DB Components, they have MyDac and UniDac , both of them could use direct access to the database without requiring mysql client to be installed on the client machine, beside they offer fast performance and high quality compared to other components 没有其他数据库组件可以击败DevArt数据库组件,他们有MyDacUniDac ,他们都可以使用直接访问数据库而无需在客户端计算机上安装mysql客户端,除了它们提供与其他组件相比的快速性能和高质量

Data Access Components for MySQL MySQL的数据访问组件

Universal Data Access Components 通用数据访问组件

and check the pages above to know why ;-) 并检查上面的页面知道原因;-)

您应该看看AnyDAC ,支持MySQL和许多其他数据库。

Devart and microOLAP both offer components to access MySQL databases. DevartmicroOLAP都提供访问MySQL数据库的组件。 Devart also have dbExpress drivers for dbExpress users. Devart还为dbExpress用户提供了dbExpress驱动程序

Bob Swart has published Delphi for Win32 VCL Database Development on Lulu, if you need any help. 如果您需要任何帮助,Bob Swart已经在Lulu上发布了Delphi for Win32 VCL数据库开发

Don't forget that MySQL's client dll are GPL-ed, and if you are using it to connect to server, your app must be GPL-ed. 不要忘记MySQL的客户端DLL是GPL编辑的,如果您使用它连接到服务器,您的应用程序必须是GPL编辑。

There are alternatives. 还有其他选择。 Components that connect directly to MySQL skipping GPLed dlls. 直接连接到MySQL的组件跳过GPLed dll。 DevArt has such components (direct and dbx), and there are free components that can connect directily on tory.net. DevArt有这样的组件(直接和dbx),并且有免费的组件可以在tory.net上直接连接。

I don't use MySQL, but when I can, I prefer dbExpress. 我不使用MySQL,但是当我可以的时候,我更喜欢使用dbExpress。 It's unidirectional, which makes it pretty fast. 它是单向的,这使得它非常快。 Though I haven't done any benchmarking recently. 虽然我最近没有做过任何基准测试。

If dbExpress isn't your thing, I found this list of components for MySQL access. 如果dbExpress不是你的东西,我找到了这个 MySQL访问组件列表

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM