[fpc-pascal] remote mysql connection

Leonardo M. Ram� martinrame at yahoo.com
Wed Feb 13 19:45:14 CET 2008


mmmm, I doubt a shared hosting allows him to connect via SSH.

Leonardo.
--- Wolfram Kläger <wolfram.klaeger at web.de> wrote:

> // Michael Van Canneyt, 12.02.2008 20:08
> > 
> > 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.'
> ...
> > 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.
> 
> I tried everything ?!
> 
> a) /etc/ssh/sshd_config: AllowTcpForwarding activated
> b) def. port 3306 is ok, Params.Add('port=anyother') as well
> c) several users, excl. root, granted all privileges on mysql command
> line, via PHPmyAdmin, ... everything alright, but SSH only
> d) Plesk 8.1 firewall on server allows SSH, but blocks MySQL ports
> 
> Yes, it's a shared server, but instead of creating a CGI workaround, as
> Leonardo proposed, I feel tunnel forwarding would be more appropriate.
> Tried to do so by using the Putty command line tool
> 
> plink ... -L 3306:127.0.0.1:3306 ...
> 
> But then in a second cmd window, telnet 127.0.0.1 3306 returns empty,
> and plink says in the first window "forwarded connection refused by
> server ... failed". Same with my .pas application, of course, trying to
> connect to 127.0.0.1 instead of remote host.
> 
> Admitted, this is no fpc problem. Any hint, anyway?
> 
> Thanks in advance
> Wolfram
> -- 
> Wolfram Kläger  Wrangellstrasse 11  D-70599 Stuttgart
> Tel. (+49) 0711 31 944 39  Fax (+49) 0711 31 944 37
> 
> 
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> 



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 




More information about the fpc-pascal mailing list