Browse Topics In
Knowledge Base
|
|
Search for Answers |
|
Intelligent FAQ Search. Type in your keywords to search for the answers you need. |
|
Import a CSV file into MySQL database.
Modified on 2005-12-16
|
Before importing your data, we highly recommend you to open the CSV file with a text editor, and ensure that the data is appear in a record of per row basis.
- Login to your One Admin control panel, and click on CSV Import link.
- First, you'll need to upload your CSV file to your web server. To do this, click on the 'Browse' button, select and locate the CSV file from your hard drive.
- Enter the number of records to preview on this page, just after you uploaded the CSV file.
- Click on the 'Upload' button. The CSV file will be saved to your web server.
- Click on the 'Click to view all columns' link to ensure that each record is properly uploaded.
- Click 'Next' to proceed to second step.
- Under the section, 'Connect Database', enter the MySQL host, MySQL user and MySQL password in the boxes provided. Click 'Save this connection information' if you want the system to remember your MySQL connection info the next time you import a new data.
- Click on the 'Connect' button.
- Select a database in which the table you want the data to import to is reside, from the drop down list.
- Select which table the data is import to from the drop down menu.
- Click the corresponding link to view the columns structure of the table chosen.
- Click on the 'Next' button.
- On the next page, 'Match Column', you will be able to see whether the columns of the CSV file you uploaded matches the columns of the table.
- If everything is alright, scroll down a bit, there is an option asking if you want to import the first record row of the CSV file. Put a check to import the first row.
- Also, if you wish to let the database auto-creates value in increment for you, check the 'Use auto increment for column' box, then select which column to apply the method to.
- Choose an import option. You have 3 options in this section, which described as below:
- Append as new records
- This option allows you to add new records to the table without affecting the existing data rows.
- Choose this option if you're importing records to an empty table.
-
Replace all existing records
- Use this option to replace the existing data with new records.
- Update records using Primary Key
- Select this option if you attempts to update only a few records rows while keeping the remaining data.
- Click here for more detailed guidelines on how to update records in existing table.
- Clicking on the 'Next' button will start importing your CSV file records to your database.
- You're then taken to the Import Summary page.
|
|
|