The following articles mainly describe the actual operation procedures of some records of MSSQL to MySQL database, as well as the problems found in the actual operations, including the problem of table creation and coding, the following describes the main content of the article. I hope you will find some gains.
Today, I converted an MSSQL database into MySQL. Without a conversion tool, I used the following method to convert data tables with few fields. MSSQL uses the Enterprise Manager and MySQL uses phpmyadmin.
1. Use the MSSQL Enterprise Manager to open the table structure (design table). locally, use phpmyadmin to create one table based on the structure, optimize the table data fields, and create the table.
2. Use the Enterprise Manager to export a single table, select text from the import source, and select the separator. The original value is ',', because phpmyadmin defaults to;, so select here ;. Export a text file.
3. Use the single-Table import function of phpmyadmin. Select the following CSV file and use load data to import the table content.
Done!
If there are many fields or a large number of records, this method is not applicable and you need to use software to help. Currently, as far as enjoy knows, there are two good software that can convert MSSQL into MySQL. One is DBConvert for MSSQL & MySQL, which can be converted to more than 10 MB in two directions. One is MSSQL to MySQL, which is very small and has more than 1 MB of compressed packages. It can specify which tables of a database are imported into SQL, or directly to MySQL, which is quite useful.
I used MSSQL to MySQL to change an MSSQL database to SQL, and found the following two problems in actual operations.
1. Table creation issues. The generated table creation SQL specifies ENGINE = INNODB. I used the MYISAM type and gbk encoding, and changed it:
- ENGINE=MYISAM DEFAULT CHARSET = GBK
2. Encoding Problems. My database is gbk encoded, and the -- default-character-set = gbk option is added during import, so that Chinese characters can be displayed normally.
- MySQL --default-character-set=gbk -D DBNAME < E:\hx\9enjoy.txt -uroot -p
The above content is an introduction to some records of MSSQL-to-MySQL databases. I hope you will have some gains.
The above content is a description of some records that MSSQL converts to the MySQL database, hoping to help you in this regard.