Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: Connect to MySql

$
0
0
Re: Connect to MySql
Web Connection 5.0
Re: Connect to MySql
10/12/2012
11:57:33 PM
3MA1FCRGC Show this entire thread in new window
Gratar Image based on email address
From:
Luca
To:
LLS 
Attachments:
None
Hi,
thank you very much again for fast and detailed reply :)
I should develop a web management tool on a Windows server to connect to other MySql Linux servers to retrieve updated data from their databases. I know how to develop web application with West Wind Web Connection, but I have no experience to connect to other database than FoxPro.
So I should ask them:
IP address of MySql servers
usernames
passwords

Do Linux administrators have to enable something on their databases to allow connection from an external procedure?

Sincerely


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" && the IP adress for the MYSQL server to use m.cMyDatabase="MyDataSQL" && the name of the MYSQL database to connect m.cMyUser="luca" && the login of the user to connect the cMyDatabase m.cMyPassWord="xxxxxx" && the password of the user to connect the cMyDatabase m.cMYConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" &&Connection string to use to connect to MySQL with 3.51 ODBC 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


West Wind Web Monitor

Viewing all articles
Browse latest Browse all 10393

Trending Articles