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

后端 未结 11 1886
一整个雨季
一整个雨季 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:38

    This is the easiest way that I have found.

    In Windows (powershell):

    cat *.sql | C:\wamp64\bin\mysql\mysql5.7.21\bin\mysql.exe -u user -p database

    You will need to insert the path to your WAMP - MySQL above, I have used my systems path.

    In Linux (Bash):

    cat *.sql | mysql -u user -p database

提交回复
热议问题