The first method is to install mysql ODBC and use the export function of SQL server to select the mysql data source for direct data export. This method is simple, but there are many drawbacks for practical applications, the most important manifestation is the data type problem. First, ntext, image, and other data types in the SQL server database cannot be directly written into the mysql database. It is said that only a slight change is required, unfortunately, this cainiao did not think about how to change it. Secondly, because I set the time in the mysql database design to the int type (the timestamp is saved), after the data is imported, conflicts will occur. Again, the field type of the mysql DATA table generated by this method is not suitable, so this method is not recommended.
The second method is to use php or asp scripts to import data. This method requires programming, but it is flexible and difficult to operate. Everything is under your control, this method is briefly introduced. The precondition is that your mysql environment has been set up. First, you have created the target database and then generated all the table structures using SQL statements. Now everything is ready, and only data is missing.
You can use the following php script to import data from the user table of mydb database in SQL server to mydb database in mysql:
Save the script as SQL. php and execute it on the server to import the data in the user table of mydb database in SQL server to the user table of mydb database in mysql. The operations on other tables are the same as those in other tables.