Connect with MySql database

Connect with MySql database

Postby Natter » Sat Feb 02, 2019 7:24 am

Hi !

I connectus with the MySql database through maria_connect(). The default port is 3306. How can I have another port ?
Natter
 
Posts: 1224
Joined: Mon May 14, 2007 9:49 am

Re: Connect with MySql database

Postby nageswaragunupudi » Sat Feb 02, 2019 10:29 am

You can suffix port number to cServerAddress with ":"
Example:
maria_Connect( "host:3455", "db", "user", "pw" )

Or
maria_Connect( "host", "db", "user", "pw", nPort )
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10655
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Connect with MySql database

Postby Natter » Sat Feb 02, 2019 10:55 am

Thank you, Mr.Rao ! I didn't know all the parameters of the maria_connect method. Where can I see them ?
Natter
 
Posts: 1224
Joined: Mon May 14, 2007 9:49 am

Re: Connect with MySql database

Postby nageswaragunupudi » Sat Feb 02, 2019 11:52 am

1) As we always recommend, if you use command syntax, you will be fully informed and never go wrong.


fwh\include\fivewin.ch
Code: Select all  Expand view  RUN
#xcommand FWCONNECT <oCn> HOST <cHost>  ;
         [<usr:USER,LANGFOLDER> <cUser> ] ;
         [ PASSWORD <cPassword>] ;
         [ <db:DB,DATABASE> <cDB> ] ;
         [ PORT <nPort> ] [ FLAGS <nFlags> ] ;
         [ CHARSET <chrset> ] [ MESSAGES <msglang> ] [ LOCALE <locale> ] ;
      => ;
      <oCn> := maria_Connect( <cHost>, [<cDB>], <cUser>, <cPassword>, [<nPort>], [<nFlags>], [<chrset>], [<msglang>], [<locale>] )
 

By examining the command translate, you will also know the full syntax.

2) You can refer to the documentation in the posts given in
viewtopic.php?f=3&t=33286
This post is always available at the top of the forum,

3) It is better to keep referring to whatsnew.txt whenever a new version is released.

4) You may refer to FiveWiki
http://wiki.fivetechsoft.com/doku.php?i ... connection
http://wiki.fivetechsoft.com/doku.php?i ... ariarowset

However, FiveWiki may not be always fully upto date and so this information is to be supplemented by whatsnew.txt.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10655
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 40 guests