我可以将 sqllite 与 mySQL 备份文件一起使用吗?

发布于 2024-12-03 11:50:26 字数 198 浏览 3 评论 0原文

如果我想离线使用 mySQL 数据库,我可以从服务器下载它并在离线时从中选择SELECT吗?这样我就可以在线时使用服务器上的版本,离线时使用本地副本。

我想做这样的事情:

sql_con = new SQLiteConnection("Data Source=MySQLDB.sql") 

If i wanted to use a mySQL database offline, could i download it from a server and SELECT from it when i am offline? That way I could use the version on the server when online, and use the local copy when offline.

i want to do something like this:

sql_con = new SQLiteConnection("Data Source=MySQLDB.sql") 

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

风和你 2024-12-10 11:50:26

如果您想离线使用 MySQL 数据库,那么在您自己的计算机上运行 MySQL 服务器软件的第二个实例会更容易。将服务器数据库复制到您的计算机上,然后,当您想要使用本地副本时,附加到本地 MySQL 实例。

If you want to use your MySQL database offline, it would be much easier for you to run a second instance of the MySQL server software on your own computer. Replicate the server database on your computer and then, when you want to use the local copy, attach to the local MySQL instance.

离线来电— 2024-12-10 11:50:26

MySQL 和 SQLite 是两个完全不同的数据库,具有截然不同的文件格式。因此直接重用文件不是一个选择。但是,您可以以 SQLite 友好的格式(例如 CSV 或直接 SQL)从 MySQL 导出数据库,然后将其导入 SQLite。很可能会涉及一些编码。

MySQL and SQLite are two completely different databases with wildly different file formats. So straight file reuse is not an option. You can, however, export the database from MySQL in SQLite-friendly format (like CSV, or straight-out SQL), and import that into SQLite. There will be some coding involved, most likely.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文