Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Transfer MySQL to SQLite

I want to start using Core Date on iPhone with pre-existing MySQL databases. What's the easiest way to transfer a MySQL database to SQLite?

I've tried using SQLite Migrator, but I don't know where to find the ODBC drivers for Mac (Snow Leopard). I found http://www.ch-werner.de/sqliteodbc/ which seems to have drivers, but they are for Power PC.

If someone could give me a walkthrough, or tell me what the best tools for this are, I'd be grateful.

Thanks.

like image 404
nevan king Avatar asked Nov 03 '09 03:11

nevan king


People also ask

Which is better MySQL or SQLite?

However, if you require scalability in terms of the number of database queries required, MySQL is the better choice. If you want any real degree of concurrency or require higher levels of security as well as user permissions management, MySQL wins over SQLite.

Can MySQL connect to SQLite?

Method 1: Converting SQLite to MySQL with . The quickest and easiest way to convert SQLite to MySQL is by exporting an SQL Database to a Dump File, and then importing the SQLite Dump into MySQL Database. You can export an SQLite Database to Dump File using the .

Why you should not use SQLite?

High write volumes: SQLite allows only one write operation to take place at any given time, which significantly limits its throughput. If your application requires lots of write operations or multiple concurrent writers, SQLite may not be adequate for your needs.

Can you transfer MySQL database?

We can transfer a MySQL database from one PC to another PC using mysqldump command. We have to create dump file of database to transfer database from one PC to another PC. MySQL database is not portable database i.e. we cannot transfer it from one PC to another PC by copying and pasting it.


1 Answers

Perhaps the simplest would be to use mysqldump to dump the raw SQL from your MySQL database into a text file and then use the sqlite3_exec() function to execute that SQL in order to populate the SQLite database.

like image 75
Mike Willekes Avatar answered Sep 30 '22 17:09

Mike Willekes