471,593 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

mysql to sqlite

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
2 4125
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
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.

Similar topics

5 posts views Thread by Mike Henley | last post: by
3 posts views Thread by Ruby Tuesday | last post: by
3 posts views Thread by stan k. | last post: by
175 posts views Thread by Sai Hertz And Control Systems | last post: by
2 posts views Thread by chun ping wang | last post: by
3 posts views Thread by Jeff | last post: by
3 posts views Thread by Daniel | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by Anwar ali | last post: by

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.