sqlite数据库迁移至mysql

安装 sqlite3-to-mysql 工具

复制代码
pip install sqlite3-to-mysql

执行迁移指令

复制代码
sqlite3mysql \
  --sqlite-file /path/to/your/target.sqlite \
  --mysql-user your_mysql_user \
  --mysql-password your_mysql_password \
  --mysql-host your_mysql_host \        # 通常是 localhost 如果 MySQL 在本机
  --mysql-port your_mysql_port \        # 通常是 3306
  --mysql-database target_database_name # 你想在 MySQL 中创建或使用的数据库名

# 示例
sqlite3mysql --sqlite-file ./五级行政区划.sqlite --mysql-user root --mysql-password root --mysql-host localhost --mysql-port 3306 --mysql-database myword
相关推荐
q***51892 小时前
离线安装 Nginx
运维·数据库·nginx
R.lin2 小时前
memcached 的核心工作机制、优缺点、适用场景以及常见问题的处理方式
数据库·缓存·memcached
醉风塘2 小时前
MongoDB Docker 镜像制作与部署指南
数据库·mongodb·docker
羑悻的小杀马特2 小时前
openGauss 应用开发测评(PostgreSQL 接入方式)
数据库·postgresql·opengauss
Alex艾力的IT数字空间3 小时前
完整事务性能瓶颈分析案例:支付系统事务雪崩优化
开发语言·数据结构·数据库·分布式·算法·中间件·php
wangchen_04 小时前
MySQL复合查询
数据库·mysql
hygge9994 小时前
MySQL 全体系深度解析(存储引擎、事务、日志、MVCC、锁、索引、执行计划、复制、调优)
数据库·经验分享·mysql·adb·面试
百***87444 小时前
【MySQL】SQL菜鸟教程(一)
sql·mysql·oracle
百***65954 小时前
PON架构(全光网络)
网络·数据库·架构