How do I convert a databse into mysql format?
-
How do I convert/import a dbf (2.4 gb) to a mysql database? I just acquired a data set that is organized as a dbf. I would like to import this into mysql. How would I do that for free? There seem to be a few 3rd party tools (which show up when I search for dbf to mysql converter) but they are not free. I also tried importing through Phpmyadmin on my personal site but the file is too large for that. Are there other ways to do this? This will be a one time thing. I am running mysql 5.1 on Windows xp.
-
Answer:
I am no expert but I think you want to get it into CSV (one row per record, commas between fields) format. I am not sure offhand how to do this from DBF but I'd try importing it into OpenOffice or Excel and saving it back out as CSV. Then you can use the LOAD DATA LOCAL INFILE command on it.
special-k at Ask.Metafilter.Com Visit the source
Other answers
How many tables are you talking about? This may be much going to get to the neighbor's house, but you could... 1. Download Microsoft SQL Server Express Edition (free) 2. Import the .dbf to SQL Server 3. Download the ODBC driver for MySQL (free) 4. Export the SQL Server database to MySQL via the ODBC driver. I'm no MySQL guru, so there may be an easier way.
DWRoelands
Depending on how much you like or hate Perl you may wish to check out http://sqlfairy.sourceforge.net/. Also, what was the http://filext.com/file-extension/DBF created by? There are a ton of different programs which will create .dbf files.
benzenedream
there is a php extension for http://us.php.net/dbase that you could use to suck the records out of the dbf files, and then generate csv or just turn around a shove it right into mysql using php. can't microsoft access handle .dbf files? i would think microsoft foxpro could, too.
jimw
Also, what was the .dbf created by? Seems like Foxpro. jimw: Don't have access right now and I really prefer using mysql to manipulate the data so the goal is to get these data in there.
special-k
from what i understand .dbf files are a standard data table format. i would be shocked to find that mysql doesn't have a method of importing it because it's so basic, but then i know nothing abut mysql. if it's command line driven, then there should be some kind of 'import' command that will have appropriate markers to indicate what the source file is. that may work better then the admin panel described above. it should be just one (really big) table.
lester's sock puppet
i would be shocked to find that mysql doesn't have a method of importing it because it's so basic. Exactly my reason for posting here.
special-k
Related Q & A:
- How do I convert a PDF file to PDF/A in Delphi?Best solution by softwarerecs.stackexchange.com
- How do I convert the image into ASCII format?Best solution by Stack Overflow
- How can I convert a string number to a number in Perl?Best solution by Stack Overflow
- How can I make a CV in pdf format?Best solution by pdfcv.com
- How can I convert a video to mp3 format?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.