且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从PHPMyAdmin导出MySQL数据库并将其导入SQLite?

更新时间:2023-01-21 16:05:20

请参阅引用的脚本连接到数据库服务器本身.它确实期望转储!

Please see that the referenced script connects to the database server itself. It does not expect a dump!

./mysql2sqlite -h example.com -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite

这是应该执行脚本的方式.使用主机,用户名,密码和要转储的mysql数据库.

This is the way the script should be executed. With host, username, passwort and the mysql database you would like to dump.

由于不同的DBMS(例如MySQL和sqlite3)之间的数据库转储和DBMS功能可能存在很大差异,因此,我建议安装本地MySQL服务器,而不要使用sqlite3.对sqlite3进行更改时,您获得了什么优势?如果不进行更改,就无法将其应用于MySQL生产数据库?

Since database dumps and DBMS features can be severely different between different DBMS (like MySQL and sqlite3), I would recommend to install a local MySQL server instead of using sqlite3. What advantage have you achieved when you make changes to sqlite3, which you cannot apply to the MySQL production database without changes?