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