Microsoft SQL DB to MySQL DB

不问归期 提交于 2020-01-24 19:53:14

问题


I have seen tons of post on this, but I am not very familiar with the process and nothing has worked.

My basic problem is I am trying to get data from a Microsoft SQL database (Using Microsoft Management Studio 2008) to convert and use in a MySQL database (using MySQL Workbench)

I have tried to dump the .sql file but when I try to import into MySQL Workbench I get errors about it not being in the UTF-8 format. I tried several ways to get it to be that encoding (such as notepadd++ converting I saw suggested everywhere), but nothing seemed to work.

If I run it, I get this error:

ERROR: ASCII '\0' appeared in the statement, but this is not 
allowed unless option --binary-mode is enabled and mysql is 
run in non-interactive mode. 

Again I looked up fixed for this, but could not get it.

I have tried a few options, just no success, so looking for some ideas or guidance with this area I do not have much experience in.

UPDATE: The problem now is that the sql file I export from Management Studio is not accepted as a valid query in Workbench.

For example the brackets are not accepted and such.


回答1:


I bet your encoding is not supported in MySQL WorkBench.

You can change the encoding when saving a .sql file.

  1. Select File|Save.sql As to invoke the save as dialog.
  2. Notice that the Save button on the lower right hand side has a drop down icon to indicate options.
  3. Select the drop down icon and choose the "Save with Encoding" context memu item.
  4. Select an encoding that works in MySQL Workbench.


来源:https://stackoverflow.com/questions/40404076/microsoft-sql-db-to-mysql-db

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!