Do Linux administrators have to enable something on their databases to allow connection from an external procedure?
Hi Luca
If you have installed on your PC the ODBC driver for MySQl you must do for example:
LOCAL cMyIpServer AS STRING, cMyDatabase AS STRING, cMyUser AS STRING, cMyPassWord AS STRING, cMyConnexionString AS STRING, cAction AS STRING, iReturn AS INTEGER, cLocalCursor AS STRING
PUBLIC iMyIdConnection AS INTEGER
m.cMyIPServeur="xxx.xxx.xxx.xxx"
m.cMyDatabase="MyDataSQL"
m.cMyUser="luca"
m.cMyPassWord="xxxxxx"
m.cMYConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};"
"SERVER="+m.cMyIpServer+";"
"DATABASE="+m.cMyDatabase+";"
"USER="+m.cMyUser+";"
"PASSWORD="+"m.cMyPassword";"
"OPTION=3;"
* Connection to MySQL
m.iMyIdConnection=SQLSTRINGCONNECT(m.cMYConnectionString,.T.)
m.cAction="SELECT col1, col2,colx FROM tablex WHERE col5="luca" ORDER BY 2"
m.cLocalCursor="cMySQLResult"
m.iReturn=SQLEXEC(m.iMyIdConnection,m.cAction,m.cLocalCursor)
IF m.iReturn>0
BROWSE
ENDIF
USE IN SELECT(m.cLocalCursor)
* Disconnection of MYSQL
=SQLDISCONNECT(m.iMyIDConnection)
Best regards
dear friends,
I need to connect to a MySql database through web only to read tables.
The MySql database is hosted on Linux and I have to make (possibly) an automatic procedure connecting to database from web, executing some query, then disconnectig.
Please, what is the procedure to connection?
Please, is it possible? How to connect from web?
Thank you very much