[Nelug] MySQL and Importing
richm at oldelvet.org.uk
Fri Jan 27 13:37:38 UTC 2006
I haven't really played with load data. I normally work with output like
that produced by mysqldump but here's a few ideas
From: nelug-bounces at mailman.lug.org.uk
[mailto:nelug-bounces at mailman.lug.org.uk] On Behalf Of Dougie Nisbet
Sent: 27 January 2006 10:16
To: North East Linux User Group mailing list
Subject: [Nelug] MySQL and Importing
The problem is that my exported data is not neat. The fields are
multi-lined, and I can't figure out how to get MySQL to identify records and
How about turning all of the newlines in the recipe to \n that means that
each recipe is on one line with the data quoted.
Another option is to try manually adding some data to mysql and dumping it.
Then see what mysql dumps and make your output copy that. I really think
that a bit of pre-processing is going to be necessary.
For instance, here's the first record as exported from HandBase. Exported as
CSV, with fields enclosed in quotation marks. As you can see, the fields are
"Quick chicken korma
cook=20m (plus rice)
serves=4","4","Rosemary Conley Low Fat Cookbook Two
> Finally, I'm normally a CLI fan and avoid GUIs. But if I'm going to be
typing in a load of recipes I thought I'd investigate the GUI front-ends
to mysql. Does anyone use any or have any recommendations? I'm running
Two great tools that I sometimes use are
apt-get install mysql-admin mysql-query-browser
there's always phpmyadmin too.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Nelug