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 to: 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
ArticleAuthor: For reprinted by enjoy, please specify the original article link.