[fpc-pascal] remote mysql connection

Leonardo M. Ram� martinrame at yahoo.com
Tue Feb 12 20:12:27 CET 2008


Are you trying to connect to a MySql server included in a Shared Hosting account?

In most cases, those servers doesn't allow remote MySql connection, just from localhost (local to
the remote server). With that, you can use a CGI script located inside the shared host and connect
to MySql.

An alternative is to create a CGI that send/retrieve queries to MySql and respond with something
like ClientDatasets to be processed by an external application using Synapse, Indy or lNet. 

Leonardo.

--- Michael Van Canneyt <michael at freepascal.org> wrote:

> 
> 
> 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.
> 
> Michael.> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal



      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping



More information about the fpc-pascal mailing list