PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Opening MySQL on a remote server using ADO command tag  (Read 285 times)

michaelgreer

  • Gold Member
  • ****
  • Posts: 71
    • View Profile
Opening MySQL on a remote server using ADO command tag
« on: May 04, 2021, 10:27:38 AM »
I have a situation where I need to access a SQL database on a different server than the one where I am running PxPlus (same network).  Can someone give me a working example of an open command  to do this. It is not clear to me from the documentation where I specifiy the ip address for the server.

EVa

  • Silver Member
  • ***
  • Posts: 32
    • View Profile
    • EDIAS
Re: Opening MySQL on a remote server using ADO command tag
« Reply #1 on: May 04, 2021, 11:00:50 AM »
The syntax would [MySQL]Database;Table;host=ip_addr;user=name;pswd=password;etc...



Devon Austen

  • Staff
  • Diamond Member
  • *****
  • Posts: 293
  • Don’t Panic
    • View Profile
    • PVX Plus Technologies
Re: Opening MySQL on a remote server using ADO command tag
« Reply #2 on: May 05, 2021, 08:26:39 AM »
If you are connecting to a MySQL database you likely want to use the [mysql] tag in your open. The [ado] tag is used for connecting with Microsoft SQL Server databases.

The example in the post above is correct and you can use the host= option to specify the server address where the MySQL DB is hosted. I would also add that you may need to also use the port= option to specify the port the MySQL server is running on. For details of the different [mysql] options please see https://manual.pvxplus.com/?command_tags/mysql.htm

OPEN (HFN)"[MySQL]Database;Table;host=ip_addr;port=port_num;user=name;pswd=password;"
Software Developer for PVX Plus Technologies LTD.