By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,114 Members | 1,570 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,114 IT Pros & Developers. It's quick & easy.

export flat file db into mysql?

P: n/a
Hi all, I know this can be done, but I just can't seem to find a way to
do it (that I can use myself, or understand).

I use Mac and I've got some databases on my hosting company's MySql
server that I use. I would like to take a database that's on my website
and change it over to use the MySql database. It's currently using a
flat file with pipes (|) to delineate each field.

The "converters" I've found online are all for Windows, and the one that
I found which would run on Mac, I just can't get it to work. For some
reason it won't connect to the server. It's called Navicat.

I do have PhpMyAdmin set up (version 2.5.5), but I can't find any way to
do this.

This database I've got has grown quite huge, and putting all of the info
in by hand would take a very long time. I know there's got to be a way
to do it using a Php script that I can install on my site. I just
haven't had success in finding the right script.

Does anyone know of something that might help? (Keep in mind, I'm not a
programmer, though I can install Php scripts just fine; and I don't have
full access to the MySql server, just through PhpMyAdmin)

Thank you very much. :)
Nov 29 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Log into mysql via the command prompt (shell, or whatever the mac has).

You want to use the LOAD DATA statement

http://dev.mysql.com/doc/refman/5.0/en/load-data.html

Nov 29 '05 #2

P: n/a
Sorry, just read, "I don't have full access to the MySql server, just
through PhpMyAdmin".

Actually you can do it through phpmyadmin, just hope it doesnt time out.

Nov 29 '05 #3

P: n/a
Cynthia wrote:
Hi all, I know this can be done, but I just can't seem to find a way
to do it (that I can use myself, or understand).

I use Mac and I've got some databases on my hosting company's MySql
server that I use. I would like to take a database that's on my
website and change it over to use the MySql database. It's currently
using a flat file with pipes (|) to delineate each field.

The "converters" I've found online are all for Windows, and the one
that I found which would run on Mac, I just can't get it to work. For
some reason it won't connect to the server. It's called Navicat.

I do have PhpMyAdmin set up (version 2.5.5), but I can't find any way
to do this.

This database I've got has grown quite huge, and putting all of the
info in by hand would take a very long time. I know there's got to be
a way to do it using a Php script that I can install on my site. I
just haven't had success in finding the right script.

Does anyone know of something that might help? (Keep in mind, I'm not
a programmer, though I can install Php scripts just fine; and I don't
have full access to the MySql server, just through PhpMyAdmin)

Thank you very much. :)


phpMyAdmin might be helpful in this case. Create a table with the
column order you have in your text file. Then, in the "Structure"
section of the table, open the link titled "Insert data from a text
file into the table"; it's at the very bottom of the page. Here you can
upload your file from your local computer and select how the text in it
should be treated.

From what I can tell, this function acts like the LOAD DATA or LOAD
DATA LOCAL methods from from command line as mentioned in a previous
post in this thread.

--
Kim André Akerĝ
- ki******@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
Nov 29 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.