Opening and saving MySQL *.sql files

To open a MySQL *.sql file

Use the File > Open command and choose MySQL (*.sql) from the File of type list or drag and drop a given *.sql file into the main GS-Base window.
Data from *.sql files can also be accessed via the Add Table and Merge Records commands.

The *.sql dump file must use the INSERT INTO command and must include the preceding table definitions.

The preferable method of saving data in binary BLOB type fields is hexadecimal (ascii text).
If data are saved in BLOB fields directly as binary streams GS-Base decodes the following escape sequences:
\0, \n, \r, \, ', ", \z

To save a MySQL *.sql file

If the open database is already in the *.sql format, the Save command causes saving it back to the same file using the same, original table (field, keys) definitions. Characters sets are converted to utf8mb4.

If the current format is not MySQL *.sql, use the File > Save Database Copy As or File > Save Recordset As commands and choose MySQL (*.sql) from the File of type list. In this case the newly created MySQL table definitions will follow the rules specified in Notes below.


To automatically resize the column widths to fit the field contents in the opened file, select the Options > General > Auto-fit column widths in imported files option. Keep in mind that for very large files this may slow down the process of importing. To optimize the resizing in the Options > General dialog box increase the declared number of processor cores that GS-Base can use.

Related Topics

Saving PDF files
Opening and saving text files
Opening and saving html files
Opening and saving Excel XML files