简体   繁体   English

如何使用Delphi连接到MySQL服务器

[英]How to connect to a MySQL server with Delphi

我知道如何使用ODBC连接到同一台计算机上的MySQL数据库,但是现在我想知道如何连接到网络上另一台服务器上的MySQL数据库。

Write the database computer's name or IP-address after Server= in the connection string. 在连接字符串中的Server=之后写入数据库计算机的名称或IP地址。 For example: 例如:

Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;

more examples here http://www.connectionstrings.com/mysql#p31 此处有更多示例http://www.connectionstrings.com/mysql#p31

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

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