Recent

Author Topic: Connecting to a mysql server on a VPS  (Read 417 times)

Robert.Thompson

  • Jr. Member
  • **
  • Posts: 56
  • "A very bad coder."
    • Google Voice for Canadians
Connecting to a mysql server on a VPS
« on: December 28, 2018, 11:36:44 pm »
Hello:

Is it possible to have my desktop lazarus program connect to a mysql database living on a Digital Oceans droplet?

Pardon the poor terminology but, if the above is possible, I think that would be more at my skill-level to build a desktop application that gets, saves and shares only data to a VPS.

Am I correct? I would distribute my lazarus exe and everyone would/could connect to the data on the VPS.

Any thoughts would be greatly appreciated.

Rob.
Lazarus:  1.8.4  2018-11-17
FPC:   3.0.4 x86_64-linux-gtk2
System:   Kernel: 4.15.0-39-generic x86_64 bits: 64 gcc: 7.3.0 Cinnamon 3.8.9 Linux Mint 19 Tara
              Phoenix v: 11JB.M044.20100622.hkk date: 06/22/2010
Intel Core i5 M 460 (-MT-MCP-) arch: Nehalem rev.5 cache: 3072 KB
NVIDIA GeForce 310M

lucamar

  • Hero Member
  • *****
  • Posts: 717
Re: Connecting to a mysql server on a VPS
« Reply #1 on: December 28, 2018, 11:46:09 pm »
Theorically, provided the connection is (or can be made) sanely done and the DB server/client allow the protocol used or can tunnel through it then yes.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 1.8.4/FPC 3.0.4 on:
(K)Ubuntu 12..16, Windows XP SP3 (Home/Prof.) and various DOS incarnations.

Robert.Thompson

  • Jr. Member
  • **
  • Posts: 56
  • "A very bad coder."
    • Google Voice for Canadians
Re: Connecting to a mysql server on a VPS
« Reply #2 on: December 29, 2018, 06:04:58 pm »
Hello:

I found this post:

http://forum.lazarus.freepascal.org/index.php?topic=3287.0

Does anyone know how to create the required “system-DSN” on linux (mint)?

I installed unixodbc-dev unixodbc-bin and unixodbc but ODBCConfig does not launch the ‘manager’.

Any suggestions?

Thanks,

Rob.
Lazarus:  1.8.4  2018-11-17
FPC:   3.0.4 x86_64-linux-gtk2
System:   Kernel: 4.15.0-39-generic x86_64 bits: 64 gcc: 7.3.0 Cinnamon 3.8.9 Linux Mint 19 Tara
              Phoenix v: 11JB.M044.20100622.hkk date: 06/22/2010
Intel Core i5 M 460 (-MT-MCP-) arch: Nehalem rev.5 cache: 3072 KB
NVIDIA GeForce 310M

sash

  • Full Member
  • ***
  • Posts: 179
Re: Connecting to a mysql server on a VPS
« Reply #3 on: December 29, 2018, 06:58:42 pm »
I don't exactly know what a "Digital Oceans droplet" is, but a regular VPS is a simply another machine, and all you have to do is to configure mysql server to accept incoming connections on external network interface.

And for a Lazarus-based MySQL client application a usage of ODBC is redundant.
Lazarus 1.8.4 Unversioned directory FPC 3.0.4 x86_64-linux-gtk2 -- Ubuntu 18.04 XFCE

lucamar

  • Hero Member
  • *****
  • Posts: 717
Re: Connecting to a mysql server on a VPS
« Reply #4 on: December 29, 2018, 07:27:11 pm »
I don't exactly know what a "Digital Oceans droplet" is [...]

Basically, virtual machines in "the Cloud". More info/hype:
Droplets on DigitalOcean - More than just virtual machines
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 1.8.4/FPC 3.0.4 on:
(K)Ubuntu 12..16, Windows XP SP3 (Home/Prof.) and various DOS incarnations.