[fpc-pascal] remote mysql connection
Michael Van Canneyt
michael at freepascal.org
Tue Feb 12 20:08:19 CET 2008
On Tue, 12 Feb 2008, Wolfram Kläger wrote:
> I am trying to get access to a remote MySQL database via sqldb and
> mysql50conn, ending up with 'EDatabaseError, Server connect failed.'
> Probably naive to assume, the fcl-db units work with a remote server as
> well as with localhost. For FTP up-/downloads I am using the Synapse
> toolkit successfully. Can anybody provide a working demo, how to mysql
> over synapse, or how to connect to a remote MySQL server at all?
The fcl-db units should work out of the box with remote servers;
I use them like that.
Just set hostname, databasename, username/password and that should be it.
Make sure that
a) the mysql server is listening to remote requests.
b) the default mysql port is correct.
(if not, add a port=xyz line to the Params property)
c) the user has permissions to connect to the database
d) the server doesn't run a firewall that blocks access.
More information about the fpc-pascal