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

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

    The following command works for me from the command line (cmd) on Windows 7 on WAMP.

    d:/wamp/bin/mysql/mysql5.6.17/bin/mysql.exe -u root -p db_name < database.sql
    

提交回复
热议问题