MySQL import solutions sql file error (sql file into Navicat for MYSQL error)

In a project database often divided into practical application and test databases, the most direct way is to export .sql file from the source database and then imported to the local database. For example, there is a project database on the server and now want to export to a local do the testing, use Navicat for MySQL can connect to the database server locally, but imported from a database .sql file server and then exported to the local database is always error (shown below) occurs, introducing the solution are discussed below sql MySQL error file together.

File Error
1: Import File Error sql
specific solution is as follows:

And a step of the data into the local database structure
1. In the local database with the same name to build a database.

2. Select the database server connection Navicat, menu bar, select "Tools" - "Data Transfer", as shown in FIG.
Here Insert Picture Description
Data Transfer
Figure 2: tool performs data transfer at
3. In the pop-up window, data transmission, "the source" part is that you want to export the source database, the "target" is the local database, click on the lower left corner Select All, then click the "start" button.
Here Insert Picture Description
Data transmission window
3: data transmission window
4. In the dialog box click "OK."
Here Insert Picture Description
Balloon
Figure 4: OK balloon
5. When the data transfer is completed, the right corner "Close" button, as shown below.
Here Insert Picture Description
Transfer Complete
Figure 5: Data transfer completion
Step two .sql derived from a backup database, and then into the local
New backup 1. connection server database, select the database to be backed up, the backup clicking the button on the menu bar, and then the mouse click New backup. The right mouse button and then select the backup file selective extraction SQL, as shown in FIG.
Here Insert Picture Description
Extract SQL
Figure 6: Extract SQL
2. In the pop-up dialog box to extract Click "Start", select a location to save the file, and then extract the file will automatically start when the extraction is complete, click Close to close the dialog box.
Here Insert Picture Description
Extraction window
Figure 7: Extract SQL file window
3. In this way we get the .sql dump file backup, and then import the .sql file to a local database, the results will not prompt an error, and as shown below .
Here Insert Picture Description
Run correctly
Figure 8: Extract SQL files correctly

Reprinted from: http://www.formysql.com/wenti/wenjian-chucuo.html

Guess you like

Origin blog.csdn.net/xiao_xiao_b/article/details/92840272