这个工具用于从MSSQL生成MySQL脚本,生成的脚本包含表结构和数据

安装

这是一个.Net Core的具具,所以需要先安装.net core SDK https://dotnet.microsoft.com/download

然后可以使用下面的命令安装:

dotnet tool install --global mssql2mysql

  

生成MySQL脚本

使用MSSQL的连接字符串进行生成,默认的生成文件是dump.sql

mssql2mysql -c "Server=(local);Database=ZKEACMS;User Id=sa;Password=sa;MultipleActiveResultSets=true;"

  

使用 -f 来指定生成的文件名:

mssql2mysql -f dump.sql -c "Server=(local);Database=ZKEACMS;User Id=sa;Password=sa;"

  

如果你想在生成的脚本中包含创建数据库的语句,可以使用 -s 参数指定数据库名称

mssql2mysql -s ZKEACMS -c "Server=(local);Database=ZKEACMS;User Id=sa;Password=sa;"

  

GitHub

https://github.com/SeriaWei/mssql2mysql

相关文章:

  • 2022-12-23
  • 2021-08-07
  • 2021-11-10
  • 2022-12-23
  • 2021-06-12
  • 2022-12-23
猜你喜欢
  • 2021-10-18
  • 2021-10-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-19
相关资源
相似解决方案