import

From PmaWiki

Jump to: navigation, search

Contents

[edit] Import formats

phpMyAdmin can import from several various commonly used formats.

[edit] CSV

Comma separated values format which is often used by spreadsheets or various other programs for export/import.

NOTE: When importing data into a table from a CSV file where the table has an 'auto_increment' field, make the 'auto_increment' value for each record in the CSV field to be '0'(zero). This allows the 'auto_increment' field to populate correctly.


This feature is available since phpMyAdmin 3.3.0.


It is now possible to import a CSV file at the server or database level. Instead of having to create a table to import the CSV file into, a best-fit structure will be determined for you and the data imported into it, instead. All other features, requirements, and limitations are as before.

[edit] CSV using LOAD DATA

Similar to CSV, only using the internal MySQL parser and not the phpMyAdmin one.

[edit] Microsoft Excel 97-2003 Workbook (XLS)

This feature is available since phpMyAdmin 3.3.0.


Excel binary XLS workbooks containing one or more spreadsheets can now be directly imported.

NOTE: Complex or convoluted spreadsheets might not be imported correctly. Also, complex or non-standard formulas may not be evaluated correctly. These issues will likely be addressed in a later release.

[edit] Microsoft Excel 2007 Workbook (XLSX)

This feature is available since phpMyAdmin 3.3.0.


Excel XLSX workbooks containing one or more spreadsheets can now be directly imported.

NOTE: Complex or convoluted spreadsheets might not be imported correctly. Also, complex or non-standard formulas may not be evaluated correctly. These issues will likely be addressed in a later release.

[edit] OpenDocument Spreadsheet (ODS)

This feature is available since phpMyAdmin 3.3.0.


OpenDocument workbooks containing one or more spreadsheets can now be directly imported.

NOTE: Formulas and calculations will NOT be evaluated, rather, their value from the most recent save will be loaded. Please ensure that all values in the spreadsheet are as needed before importing it.

[edit] SQL

SQL can be used to make any manipulation on data, it is also useful for restoring backed up data.

[edit] XML

This feature is available since phpMyAdmin 3.3.0.


XML files exported by phpMyAdmin (version 3.3.0 or later) can now be imported. Structures (databases, tables, views, triggers, etc.) and/or data will be created depending on the contents of the file.

[edit] Import methods

[edit] Form based upload

Can be used with any supported format, also (b|g)zipped files, e.g., mydump.sql.gz .

[edit] Form based SQL Query

Can be used with valid SQL dumps.

[edit] Using upload directory

You can specify an upload directory on your web server where phpMyAdmin is installed, after uploading your file into this directory you can select this file in the import dialog of phpMyAdmin.

see $cfg['UploadDir']

Advertisement