If you have Microsoft Access dbase or Excel spreadShhets and want to put them in your Linux box you need:
First case - withou using MyODBC
1 - Create a table in MySql with the structure necessary to save your MS data;
2 - If you need more tables, create them all;
3 - If you DON'T WANT to use MyODBC, you need to EXPORT the MS data to a text file.
In this case the fields must be separeted by a character (like ';' for example) and you can use another character to enclose de fields ( like " for example).
In some MySQL versions the latest field must be followed by the field separator too.
Example:
"FIELDS #1";"FIELDS #2";"FIELDS #3";...;"FIELDS #N";
Observe the ";" after the FIELD #N
MS Access have good tools to export tables or queries to text files. You
can export them with fixed column width or using text delimiters. And, propably,
Excel have the same tools too.
But what you need to put in your mind is that the text file must reflect the correct
structure of your MySQL table. Each field in the text file (left to right) must correspond to the MySQL column
table (up to down or left to right).
4 - After creating the text file, copy it to you Linux box. If you don't use Samba,
try a FTP session or floppy disks;
5 - Use mysql client to import the text file to the MySQL table. You need the privileges, of course, to login the database and to access the target table and to insert data in the table;
6 - See the 'LOAD DATA ... INFILE ' MySQL Command to know how this works.
Second case - Using MyODBC
1 - Create a ODBC connection using the MyODBC driver. The MyODBC must be installed in your machine. See Control Panel/ ODBC data sources. Follow the steps to configure a DSN to link you with your MySQL database;
2 - Open you Access DB;
3 - Select the appropriate table;
4 - Right click the mouse over the table and select Export. In Save as Type, select ODBC database;
5 - The Wizard will ask you to select a DSN (Data Source Name) which will link you with the ODBC database. In this case, select the DSN created with the MySQL ODBC Driver.
6 - And you need to login with a user with privileges to create table and insert data;
7 - After this, the table will be CREATED in your MySQL Database.
third case - Using MyODBC
1 - Create a ODBC connection using the MyODBC driver. The MyODBC must be installed in your machine. See Control Panel/ ODBC data sources. Follow the steps to configure a DSN to link with the you MySQL database;
2 - Open you Access DB;
3 - Right click the mouse over the Tables section and select Link Table. In Type, select ODBC database;
4 - The Wizard will ask you to select a DSN (Data Source Name) which will link you with the ODBC database. In this case, select the DSN created with the MySQL ODBC Driver.
5 - All tables in the database will be visible to you. Select the target table;
6 - After this, the table will be LINKED in your Access Database.
7 - Now append "Microsoft Data" to the linked table. You can use a Append Query, created in Access, to insert data in MySQL table.
INSERT INTO MySQLTable (f1,f2,f3,...,fn) SELECT (f1, f2,f3,...,fn) FROM AccessTable ...
Have a nice day.
Paulo Caldas