SQL Server data migration to MySQL considerations:
Some field types are different and need to be converted during migration
Unique indexes differ, only one null is allowed for a unique index column in SQL Server, but there can be more than one null in MySQL
Stored procedure syntax is a big difference and needs to be rewritten after migration is complete
SQL query syntax is also different and needs to be modified in the application
Here we first use the navicat for a migration from SQL Server to MySQL, the following steps:
Step 1: Create the name of the database you want to import in MySQL, here we create the Yhtest
650) this.width=650; "src=" Https://s4.51cto.com/oss/201711/08/387b8249001c0c963c672b140ac38b4a.png "style=" float: none; "title=" QQ picture 20171108140048.png "alt=" 387b8249001c0c963c672b140ac38b4a.png "/>
Step 2: Select the newly created Yhtest table mode and click Import Wizard
650) this.width=650; "src=" Https://s4.51cto.com/oss/201711/08/b4202ba764db25d166c8332a6ae68859.png "style=" float: none; "title=" QQ picture 20171108140058.png "alt=" B4202ba764db25d166c8332a6ae68859.png "/>
Step 3: Select the import format, here we select ODBC
650) this.width=650; "src=" https://s4.51cto.com/oss/201711/08/47a1764f926c609139301aa3c058edc3.jpg "style=" float: none; "title=" QQ picture 20171108140104.jpg "alt=" 47a1764f926c609139301aa3c058edc3.jpg "/>
Step 4: Select the provided program as shown in
650) this.width=650; "src=" Https://s4.51cto.com/oss/201711/08/41a065db7d6a9ce52484afeea5609aec.png "title=" QQ picture 20171108142052.png "style=" Float:none; "alt=" 41a065db7d6a9ce52484afeea5609aec.png "/>
Step 5: After selecting a good provider, configure the corresponding connection, the same way as SQL Server, there are two, both can, after the configuration is complete, test the connection through
650) this.width=650; "src=" Https://s4.51cto.com/oss/201711/08/f448b10aa24e4eafdfd94db5cb9b9e12.png "style=" float: none; "title=" QQ picture 20171108140113.png "alt=" F448b10aa24e4eafdfd94db5cb9b9e12.png "/>
650) this.width=650; "src=" Https://s4.51cto.com/oss/201711/08/7c7ce1e1778aef8d54bf720b0f9cf760.png "style=" float: none; "title=" QQ picture 20171108142507.png "alt=" 7c7ce1e1778aef8d54bf720b0f9cf760.png "/>
Step 6: Select the data source table, which is the table you want to migrate from SQL Server to the MySQL yhtest library
650) this.width=650; "src=" Https://s4.51cto.com/oss/201711/08/5775445adfc83b130c9e1fae4eb9e30b.png "style=" float: none; "title=" QQ picture 20171108142637.png "alt=" 5775445adfc83b130c9e1fae4eb9e30b.png "/>
Step 7: After selecting the source table, select the target table, the target table can be renamed operation
650) this.width=650; "src=" Https://s4.51cto.com/oss/201711/08/65c1f37c9bc4392e307cb62de4916450.png "style=" float: none; "title=" QQ picture 20171108142941.png "alt=" 65c1f37c9bc4392e307cb62de4916450.png "/>
Step 8: After the target table name is determined, we can adjust the corresponding field of the target table, be sure to ensure that the new field type can store content from SQL Server
650) this.width=650; "src=" Https://s4.51cto.com/oss/201711/08/5e77f7febc844f91a443d168d01bd849.png "style=" float: none; "title=" QQ picture 20171108143025.png "alt=" 5e77f7febc844f91a443d168d01bd849.png "/>
Step 9: After the target table is determined, we can choose an import mode, that is append or overwrite, after the selection is complete, the next step
650) this.width=650; "src=" Https://s4.51cto.com/oss/201711/08/9a50d5770d8ccd7971736dee925436fc.png "style=" float: none; "title=" QQ picture 20171108143400.png "alt=" 9a50d5770d8ccd7971736dee925436fc.png "/>
Step 10: Click to start, the following interface, pay attention to error or abnormal information. After completion, confirm that the data content is not garbled, the data is consistent, the migration is complete
650) this.width=650; "src=" Https://s4.51cto.com/oss/201711/08/46b6c1de0fd007df320b62d106842b75.png "style=" float: none; "title=" QQ picture 20171108143605.png "alt=" 46b6c1de0fd007df320b62d106842b75.png "/>
Linux Advanced network Programming