How can I import a database with MySQL from terminal?

后端 未结 18 1373
盖世英雄少女心
盖世英雄少女心 2020-11-27 09:14

How can I import a database with mysql from terminal?

I cannot find the exact syntax.

18条回答
  •  忘掉有多难
    2020-11-27 09:34

    Before running the commands on the terminal you have to make sure that you have MySQL installed on your terminal.

    You can use the following command to install it:

    sudo apt-get update
    sudo apt-get install mysql-server
    

    Refrence here.

    After that you can use the following commands to import a database:

    mysql -u  -p  < 
    

提交回复
热议问题