
You can use the phpMyAdmin Web pages we provide to import a text file into a table of your MySQL database. You might need to do this, for example, if you have data in Excel that you need to import into MySQL.
On this page:
You first need to prepare the text file so that it's in the right format. The simplest way is to use a CSV (comma separated values) file exported from Excel, making sure that the order of the fields in the text file is exactly the same as the order of the fields in your MySQL table.
Hint: If you use any dates in the Excel file, set the field to use the custom "yyyy-mm-dd" Excel data format before you export. This will make sure that the field matches MySQL's date format and imports correctly.
When you've exported the Excel data to a CSV file on your hard disk, go to https://www.tigertech.net/phpmyadmin/ and login. The username is your MySQL database name, and the password is the password for that database (which may be different from your main account password).
After logging in, navigate to the phpMyAdmin import screen by doing this:
You'll then see a screen that allows you to choose the import options:
You should see something like Inserted rows: 1209 (Query took 0.00 sec) at the top of the screen. Click the Browse tab to review the imported data.
Yes, definitely. The method suggested above is only one way of doing it.
Another option for advanced users is to write a script in Perl or PHP that reads your text file, splits up each line into fields, and then performs the appropriate INSERT commands. Each script will be different, but an experienced programmer should be able to write such a script in a dozen lines of code or so, and it gives you the greatest flexibility.
You can also enable remote access to your database, allowing you to use a program such as MySQL Administrator on your own computer to manage it.