Is there a better way to do this?
How to migrate Flat Text File into MySQL?
1–8 of 8 posts
Re: How to migrate Flat Text File into MySQL?
#2Re: How to migrate Flat Text File into MySQL?
#3Re: How to migrate Flat Text File into MySQL?
#4are you doing bulk inserts or one-per-transaction?
Re: How to migrate Flat Text File into MySQL?
#5Do it on the server.
Re: How to migrate Flat Text File into MySQL?
#6Do it on the server.
I don't have a shell access to my client's shared server, so I can't do it using perl/bash. Yes, I'll try this with PHP instead.
PHP can call system commands, so you could do system("Mysql import ...(file)...").
more info about the command here: http://dev.mysql.com/doc/refman/5.0/en/mysqlimport.html
Re: How to migrate Flat Text File into MySQL?
#7Earlier quoted context omitted.
I don't have a shell access to my client's shared server, so I can't do it using perl/bash. Yes, I'll try this with PHP instead.
you could upload the file to your server and do a mysql_import (I assume it's tab/comma delimited). PHP can call system commands, so you could do system("Mysql import ...(file)..."). more info about the command here: http://dev.mysql.com/doc/refman/5.0/en/mysqlimport.html
Re: How to migrate Flat Text File into MySQL?
#8Do it on the server.
This desktop app technique I am using now is more geared towards my clients who cannot do that command/code (you are recommending) themselves. I am looking at how to do this kind of migration and synchronization of local and online (MySQL) databases automatically (or at least with a single click by my clients). My clients may not even know how to do FTP; even if I provide them with manuals to the technical steps, they might find it difficult. That’s why I am building these VB.NET migration/synchronization utilities that do flat-file migration and local-to-online (Intranet-to-Internet) table synchronization so that they can accomplish the task on their own.
I can setup MySQL Replication but they will have problem with primary IDs. Aside from that, I don’t know other tools/technique out there that can do these migration and synchronization.