![How to import sql files into navicat](https://img.php.cn/upload/article/000/000/040/5d54edf7a2415951.JPG)
Navicat is a view management tool for mysql that is widely used. Below is a record of how Navicat imports sql files.
Recommended tutorial: MySQL database video tutorial
##Method/step
1. 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 the database.
![1565847356740823.jpg How to import sql files into navicat](https://img.php.cn/upload/image/632/476/800/1565847356740823.jpg)
2. Enter the name of the database. Here I choose utf-8 encoding because I specifically selected utf-8 when I installed mysql.
![1565847385437997.jpg How to import sql files into navicat](https://img.php.cn/upload/image/257/413/425/1565847385437997.jpg)
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.
![1565847404877505.jpg How to import sql files into navicat](https://img.php.cn/upload/image/330/500/257/1565847404877505.jpg)
#4. Then click the icon as shown in the picture to find the sql file you want to run.
![1565847427282216.jpg How to import sql files into navicat](https://img.php.cn/upload/image/746/935/998/1565847427282216.jpg)
#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.
![1565847448333072.jpg How to import sql files into navicat](https://img.php.cn/upload/image/735/776/361/1565847448333072.jpg)
6. After selecting, click OK, and it will run the sql statement. If successful, the following related information will be displayed. Click Close.
![1565847484721019.jpg How to import sql files into navicat](https://img.php.cn/upload/image/436/287/612/1565847484721019.jpg)
The above is the detailed content of How to import sql files into navicat. For more information, please follow other related articles on the PHP Chinese website!
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn