How to import sql files into the mysql database: first open mysql and enter the password; then create the database and enter "use database name"; finally start importing the sql file and enter the "source sql file path".
![How to import sql file into mysql database](https://img.php.cn/upload/article/202009/29/2020092914334594269.jpg)
##More related free learning recommendations: mysql tutorial(Video)
How to import sql files into mysql database:
1. Find mysql in the start interface.
![1601361055245934.png How to import sql file into mysql database](https://img.php.cn/upload/image/794/582/705/1601361055245934.png)
#2. Double-click to open the mysql software. , and enter the password.
![1601361060397853.png How to import sql file into mysql database](https://img.php.cn/upload/image/461/891/923/1601361060397853.png)
#3. If there is a statement to create a database in the content of the sql file or you want to store the table in your existing database, there is no need to create a database here.
![1601361067930063.png How to import sql file into mysql database](https://img.php.cn/upload/image/234/428/432/1601361067930063.png)
4. Enter "show databases;" to see the database you created.
![1601361072901921.png How to import sql file into mysql database](https://img.php.cn/upload/image/927/401/165/1601361072901921.png)
5. Enter "use database name" to start using this database.
![1601361077962870.png How to import sql file into mysql database](https://img.php.cn/upload/image/240/745/399/1601361077962870.png)
6. Start importing the sql file and enter the "source sql file path" (note that if your file path is copied, replace all "\" with " /”)
![1601361081672116.png How to import sql file into mysql database](https://img.php.cn/upload/image/825/681/824/1601361081672116.png)
#7. Enter “show tables” and you will see the tables you imported.
![1601361085363091.png How to import sql file into mysql database](https://img.php.cn/upload/image/641/243/672/1601361085363091.png)
The above is the detailed content of How to import sql file into mysql database. For more information, please follow other related articles on the PHP Chinese website!