473,395 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

export flat file db into mysql?

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
3 2060
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: raykyoto | last post by:
Hi all, I'm sure this is a popular question that comes up every few months here. Indeed, I've looked at some of the past postings, but I would like to ask things differently. Basically, I'm...
2
by: kk | last post by:
Hello, Help! Does anyone have an example of a trigger that will export a newly inserted row into a flat file? Basically anytime a row is inserted into a specific table a flatfile (fixed width)...
9
by: FFMG | last post by:
In my site I have a config table, (MySQL), with about 30 entries; the data is loaded on every single page load. This is not the only call to the db, (we do a total of about 8 calls to the db). As...
1
by: Swedge | last post by:
Hello I'm very new to using DB2, and would like to know about exporting the contents of a table to a flat file. For example, I have the following character string in a text field Craig Sweeney...
2
by: Dave Williams | last post by:
Im not a techie but run a small business in UK. We take instructions from clients from emails hard copy, spreadsheets etc and put them on excel templates then import to Access. A client wants us to...
6
by: Kevin Humphreys | last post by:
Hi There, I am developing an windows application using VB.NET and I need to export and open the contents of my datagrid to a flat file. Preferably txt or wordpad. Whats the best direction/chunk...
5
by: Gorilla3D | last post by:
I've writing my own flat file database.. well table-based pure php code, PhpSimpleDb but I was looking into some bench marking so was wonder if anyone knew any other flat-file php db's out there. ...
3
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I have a question for you. I have a .csv file which has many lines of data. Each line has many data fields which are delimited by ",". Now I need to extract part of data from this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.