Pretty easy to set-up:
1. Download the mysql connector from the following site
2. Inside your database create the following table:
-- Table structure for table `mapinfo_mapcatalog`
--
CREATE TABLE IF NOT EXISTS `mapinfo_mapcatalog` (
`SPATIALTYPE` float default NULL,
`TABLENAME` char(32) default NULL,
`OWNERNAME` char(32) default NULL,
`SPATIALCOLUMN` char(32) default NULL,
`DB_X_LL` float default NULL,
`DB_Y_LL` float default NULL,
`DB_X_UR` float default NULL,
`DB_Y_UR` float default NULL,
`COORDINATESYSTEM` char(254) default NULL,
`SYMBOL` char(254) default NULL,
`XCOLUMNNAME` char(32) default NULL,
`YCOLUMNNAME` char(32) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `mapinfo_mapcatalog`
3. Use similar syntax to reference with MySQL statement below in MapBasic
Register Table "<Your Table Name>" TYPE ODBC TABLE "Select * FROM <YOUR TABLE>" CONNECTION "DATABASE=<YOUR DATABASE>;DRIVER={MySQL ODBC 5.1 Driver};OPTION=0;PWD=<your password>;PORT=0;SERVER=<your server>;UID=<your mysql user>;" toolkit "ODBC" Versioned Off Workspace "" ParentWorkspace "" Into "C:\LOCATION FOR TABLE REFERENCE"
***REMEBER TO REPLACE <YOUR's> with actual minus the <> *******
4. Happy coding and remember that the SQL statements vary in MapBasic to the Mysql statements for example in MySQL ='4' is good but in MapBasic ="4" is correct.....
Good Luck,
-Jeff