

How to migrate Flat Text File into MySQL? - zeroxsys

I am running a VB.NET loop that imports a flat text file of 122677 towns/cities of Japan into an online MySQL table. MySQL Workbench crashes when you upload table this big, so export/import won't work. It took less than 2 hours when I first run it for local migration, now it's only at 55600 after 3 hours.<p>Is there a better way to do this?
======
smoove
Do it on the server.

~~~
zeroxsys
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.

~~~
rick888
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>

~~~
zeroxsys
Yes, I am familiar with that, thank you @rick888.

------
there
are you doing bulk inserts or one-per-transaction?

~~~
zeroxsys
Not using transaction, auto-commit.

