How do I import an SQL file using the command line in MySQL?

后端 未结 30 2289
不知归路
不知归路 2020-11-22 06:48

I have a .sql file with an export from phpMyAdmin. I want to import it into a different server using the command line.

I have a Windows Ser

30条回答
  •  一生所求
    2020-11-22 07:16

    Import a database

    1. Go to drive:

       command: d:
      
    2. MySQL login

       command: c:\xampp\mysql\bin\mysql -u root -p
      
    3. It will ask for pwd. Enter it:

       pwd
      
    4. Select the database

       use DbName;
      
    5. Provide the file name

       \.DbName.sql
      

提交回复
热议问题