0

I know how to use ODBC to connect to a MySQL database on the same machine, but now I want to know how to connect to a MySQL database on another server across the network.

Sam
  • 2,663
  • 10
  • 41
  • 60
falsafa
  • 55
  • 1
  • 4
  • 1
    Maybe the answer to this question http://stackoverflow.com/questions/2918016/delphi-7-ado-need-basic-coding-example can help you. – RRUZ Jun 16 '12 at 16:44

1 Answers1

3

Write the database computer's name or IP-address after Server= in the connection string. 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

Stijn Sanders
  • 35,982
  • 11
  • 45
  • 67