Restore MYSQL Dump File with Command Line

前端 未结 9 1584
长情又很酷
长情又很酷 2021-02-04 02:57

I have file.sql, and I want to restore it. I found this command:

mysql -u username -p database_name < file.sql

Where should I put \'file.sql\' in

9条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-04 03:19

    The best option will be

    1) open the command prompt by Start -> Run -> Command or anyway 2) change you directory where the file.sql is saved say C:\temp\file.sql so your command prompt should look like

    C:\temp> 
    

    3) now try these command

    mysql -u root -p database_name < file.sql
    

提交回复
热议问题