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

mysql to sqlite

P: n/a
I'm trying to convert mysql database to sqlite. is their any free tool
that does that?
I can convert my mysql db to XML file through phpmyadmin, will it be
easier to convert from XML to SQlite then from Mysql?
Jun 27 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Gandalf wrote:
I'm trying to convert mysql database to sqlite. is their any free tool
that does that?
I can convert my mysql db to XML file through phpmyadmin, will it be
easier to convert from XML to SQlite then from Mysql?
Did you look at http://www.sqlite.org/cvstrac/wiki?p=ConverterTools ?

I'd try one of these if I need it. Otherwise it seems easier for me to
parse XML than to try out all the options of mysqladmin, which probably
still won't produce anything that can directly be fed to sqlite3.

It would be a nice programming exercise. Hint: You can pretty safely
ignore all type information you get from MySQL, because types in SQLite
depend on the inserted values, and not the table definition.

-- Gerhard

Jun 27 '08 #2

P: n/a
Gandalf <go******@gmail.comwrote:
I'm trying to convert mysql database to sqlite. is their any free tool
that does that?
I can convert my mysql db to XML file through phpmyadmin, will it be
easier to convert from XML to SQlite then from Mysql?
I'd probably create the sqlite tables first by editing the database
schemas produced by mysqldump to make the acceptable to feed to
sqlite.

I would then write a script which connects to both databases at once
and copies the table data across.

(At least that is what I did last time I needed to do that which was
from MSSQL->MySQL).

You'll find that different databases have subtly different ways of
doing things (eg autoincrement fields on mysql) so you'll most likely
need a custom script anyway.

--
Nick Craig-Wood <ni**@craig-wood.com-- http://www.craig-wood.com/nick
Jun 27 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.