How to easily import multiple sql files into a MySQL database?

后端 未结 11 1801
一整个雨季
一整个雨季 2021-01-29 20:02

I have several sql files and I want to import all of them at once into a MySQL database.

I go to PHPMyAdmin, access the databa

11条回答
  •  天涯浪人
    2021-01-29 20:20

    Enter the mysql shell like this.

    mysql --host=localhost --user=username --password --database=db

    Then use the source command and a semicolon to seperate the commands.

    source file1.sql; source file2; source file3;

提交回复
热议问题