如何在PHP中将MySQL数据库文件(.sql)转换为SQLite文件?

I have a MYSQL database dump file in ".sql" format but I have required "SQLite" file, is it possible to convert .sql file into SQLite file using php script or any other way?

I have also tried shell script code but this script create only file with 0 bytes.

Thanks 2 all

Go to phpmyadmin click export database download as sql file.

Download it....

go to your sql lite management software import the .sql file

done...

If you do not have access to PhpMyAdmin, you could use the mysql dump command and use this file to import it into your sqlite database http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html

Basically, the dump file contains the table building data and the rows to be inserted. In most cases the INSERT commands should work on SQLlite, but the table building might need to be modified. The exact needed changes depends how did you get your sql dump file (in which utility, version, definition, etc.). I suggest you try to import it directly and handle the errors one by one. Than you could write your own conversion script.

If your having any problems paste the problematic parts of the dump file here.

Good luck!