![]() |
#1
|
|||
|
|||
![]()
hi
i want connect to mysql database in host i install mydac component in delphi but closed 3306 port Friends had suggested use php web service for connect database How it should be done? have example? tnx ![]() |
#2
|
|||
|
|||
![]()
Did you install a mysql server to your computer or do you want to connect to a remote computer? Please be more specific!
|
#3
|
|||
|
|||
![]()
i want connect to remote compure
|
#4
|
|||
|
|||
![]() Quote:
1. Remote access is enabled on the mysql server 2. A firewall/AV doesn't block your connection Remote access is usually disabled for security reasons, so probably the best solution is to use a php webservice to communicate with the mysql service. You can send Get and Post commands from delphi with TIdHttp(just google it), and read the response. |
#5
|
|||
|
|||
![]()
have you example ?
if have , plaease uploud. tnx ![]() |
#6
|
|||
|
|||
![]() Quote:
1. Delphi Drop a TidHTTP component and a TButton to your form. Doubleclick the button: Code:
procedure TForm1.Button1Click(Sender: TObject); var url: string; SS: TStringStream; SL: TStringList; begin url := 'http://localhost/Delphi.php'; //<--change this to your URL SL := TStringList.Create; try SL.Add('a=' + IntToStr(4)); SL.Add('b=' + IntToStr(5)); SS := TStringStream.Create(''); try IdHTTP1.Post(URL, SL, SS); ShowMessage(ss.DataString); finally SS.Free; end; finally SL.Free end; end; Code:
<?php $a=$_POST['a']; $b=$_POST['b']; echo $a + $b; ?> |
#7
|
|||
|
|||
![]()
thank you my dear friend
very gooood ![]() |
#8
|
|||
|
|||
![]()
HTTP Tunneling is the Answer... Sorry. Late Reply.
![]() Regards! |
![]() |
Thread Tools | |
Display Modes | |
|
|