There are many simple ways to export data from SQL to MYSQL from SQL. This article introduces a simple method to import and export data directly using the GUI of SQL and mysql without programming.
The premise is that you have installed the sqlserver client and the graphical interface management tool phpmyadmin of mysql.
Open sqlserver enterprise manager in the root directory of the console, create a sqlserver group, and select it based on your needs. then create sqlserver registration to connect to sqlserver. After the preparation is complete, the following will begin:
First, open the data conversion service, create a new package, open the DTS interface, and select a data source for configuration in the connection. Select the target file to be converted. here, we select Textfile (destination). after selecting the storage location of the file, we will create a new task. Here we only select a data conversion task. after selecting the data source and destination respectively with the mouse "select source connection" and "select destination connection", we define the newly generated connection, define the source, purpose, and conversion in sequence in its properties.
The task is successfully executed. Save the task. Then export the data on the new task. a wizard prompts you to select "Copy table and view from Source Database ".
This step has exported the data to the target file.
Next, create a new table in mysql. when the table is consistent with the structure to be imported, directly select "extract data from a text file and insert it to the data table:". after the options are added, "Send" is enough. check that the data has been imported. If the table to be imported already exists and the attribute names are different, create a table with the same structure as the data to be imported and import the data (just as you did ), then, export "data and structure" in mysql to obtain the SQL statement, edit it in the text file, and use the replacement function of the text editor to modify the table name and add the column name, finally, paste it to the SQL statement where you want to import the table. execute the SQL statement and the data is imported.
If an error occurs during the process, check the configuration options carefully to ensure that they are correct.