How to import CSV file to MySQL using phpMyAdmin
Here's one way to get your Excel file into MySQL via phpMyAdmin:
(NOTE: make sure your table on MySQL has the same number of columns as the excel file):
1. Export your .xls file to .csv and remove the first line (column names)
2. Launch phpMyAdmin -> select table
Import ->
Location of text file ->
CSV using LOAD DATA ->
Fields terminated by [,] ->
Fields enclosed by [ ] ->
Fields escaped by [ ] ->
Lines terminated by [\r] -> Go
(NOTE: make sure your table on MySQL has the same number of columns as the excel file):
1. Export your .xls file to .csv and remove the first line (column names)
2. Launch phpMyAdmin -> select table
Import ->
Location of text file ->
CSV using LOAD DATA ->
Fields terminated by [,] ->
Fields enclosed by [ ] ->
Fields escaped by [ ] ->
Lines terminated by [\r] -> Go

Comments (7)
Thank you! Wonderfully simple explanation after hours of surfing through incomprehensible techspeak - I knew I was nearly there and \r finally did it. Thank you again!
Your very welcome SuriG -- glad to hear it helped! :-)
Cheers. Perfect.
Awesome! I, too, waded through hours of jargon-filled explanations. Thanks for such an easy tip!
Thank you! This was very helpful for me as well!
Give that man a medal!
Thank you.
Again your awesome. Thanks a ton.