如何在PHP中将MySQL数据库转换为SQLite? [英] How can I convert MySQL database to SQLite in PHP?
本文介绍了如何在PHP中将MySQL数据库转换为SQLite?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要PHP代码来转换数据库.我尝试了如何使用PHP将mysql转换为SQLite ,但是有答案
I need PHP code to convert the database. I tried How to convert mysql to SQLite using PHP but it dint have answer
推荐答案
我终于找到了解决方案.
将sh文件保存在
https://gist.github.com/943776
并执行
"./mysql2sqlite.sh DBNAME --databases DBNAME -u DB_USERNAME -pDB_PASSWORD | sqlite3 database.sqlite
"(不带qoutes且带`")
在php文件中.
将两个文件都保存在一个文件夹中
I finally found its solution.
Save sh file available at
https://gist.github.com/943776
and execute
"./mysql2sqlite.sh DBNAME --databases DBNAME -u DB_USERNAME -pDB_PASSWORD | sqlite3 database.sqlite
"(without qoutes and with "`")
in php file.
Save both files in one folder
这篇关于如何在PHP中将MySQL数据库转换为SQLite?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文