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

后端 未结 30 2284
不知归路
不知归路 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:35

    1. Open the MySQL command line
    2. Type the path of your mysql bin directory and press Enter
    3. Paste your SQL file inside the bin folder of mysql server.
    4. Create a database in MySQL.
    5. Use that particular database where you want to import the SQL file.
    6. Type source databasefilename.sql and Enter
    7. Your SQL file upload successfully.

提交回复
热议问题