Connect with MySql database

Post Reply
Natter
Posts: 1244
Joined: Mon May 14, 2007 9:49 am

Connect with MySql database

Post by Natter »

Hi !

I connectus with the MySql database through maria_connect(). The default port is 3306. How can I have another port ?
User avatar
nageswaragunupudi
Posts: 10729
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 10 times
Contact:

Re: Connect with MySql database

Post by nageswaragunupudi »

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
Natter
Posts: 1244
Joined: Mon May 14, 2007 9:49 am

Re: Connect with MySql database

Post by Natter »

Thank you, Mr.Rao ! I didn't know all the parameters of the maria_connect method. Where can I see them ?
User avatar
nageswaragunupudi
Posts: 10729
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 10 times
Contact:

Re: Connect with MySql database

Post by nageswaragunupudi »

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

#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
Post Reply