![]() |
||||||||||||||||
|
|
How to Import CSV file into MySql database
We will continue from our previous tutorial for How to Import Excel XLS file into MySql database into the exact solution of the problem - Converting the file into CSV (Comma Separated Value) and next easily importing into MySql.
"1";"PalmOS"This method is very good for importing large file with many rows because, filling the table is made locally on the computer where is both MySql server and CSV file. This will resulted over the speed and execution time which is problem if you make it with PHP script (PhpMyAdmin for example) like I will show you at the and of this tutorial.
When we already have our CSV file prepared we can use MySql console to enter a command for filling selected table with the data from CSV file. This can be done like shown in the code bellow: Please note that you have to specify correct path to CSV file and of course this file can be accessible for this user. Also when login in console you have to use this user which have correct credentials for writing data in this MySql database and table. C:\mysql\bin>mysql.exe -u root -pOK, well done. But now we will examine the more easiest way - to import the Excel CSV file into MySql database visually - just with some mouse clicks using PhpMyAdmin.
First login to PhpMyAdmin, select database and desired table and click on import tab like shown in the picture below: Next select Excel CSV file, click on the checkboxes which define the CSV format and click Go button. When importing is finished we will have ready for use table with filled data.
|
Need a specific tutorial? Do not hesitate and submit a request! |
||||||||||||||
|
Home | Sitemap |
Terms & Privacy
© ONLINEHOWTO.net 2006-2010 |
||||||||||||||||
posted on 2010-Mar-31 | 04:19:14 AM