Navicat for Mysql is a view management tool for mysql that is widely used. The following records how Navicat for mysql imports sql files.
First create a database (because the sql file I imported only has statements for creating tables and inserting data).
Right-click on the connection name to create a new database.
Enter the name of the database. Here I choose utf-8 encoding because I specifically selected utf-8 when I installed mysql.
Related recommendations: "Navicat for mysql graphic tutorial"
Double-click your newly created database to make it appear green . Then right-click on the name of the database and select Run sql file.
#Then click the icon as shown to find the sql file you want to run.
Note that when there are multiple sql files you want to run, you must pay attention to their order. For example, there is SQL to create tables first, and then there is SQL to insert data.
After selecting, click OK and it will run the sql statement. If successful, the following relevant information will be displayed, then click Close.
At this time, click on the database where you run the sql file, and then refresh with F5, and you will be able to see the effect of sql (such as table structure and data).
The above is the detailed content of How to import sql in navicat. For more information, please follow other related articles on the PHP Chinese website!