Navicat for Mysql is a view management tool for mysql that is widely used. Below is a record of how Navicat for mysql imports sql files.
Recommended tutorial:MySQL introductory video tutorial
1. First create a database (because I import The sql file only has statements for creating tables and inserting data).
Right-click on the connection name to create the database.
2. Enter the name of the database. Here I choose utf-8 encoding because I specifically selected utf-8 when I installed mysql.
3. Double-click your newly created database to make it display green. Then right-click on the name of the database and select Run Sql file.
#4. Then click the icon as shown in the picture to find the sql file you want to run.
#5. Note that when there are multiple sql files you want to run, you must pay attention to their order. For example, there is the sql to create the table first, and then the sql to insert the data.
6. After selecting, click OK, and it will run the sql statement. If successful, the following related information will be displayed. Click Close.
#7. At this time, click on the database where you are running the sql file, 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 mysql. For more information, please follow other related articles on the PHP Chinese website!