Import SQL file by command line in Windows 7

前端 未结 16 1474
攒了一身酷
攒了一身酷 2021-01-30 11:20

I want to import an SQL file (size > 500MB) into a database. I have wamp on my PC. Phpmyadmin does not work well with this size. I changed all parameters in php.ini (max_upload_

16条回答
  •  抹茶落季
    2021-01-30 11:47

    If you are using Windows PowerShell you may get the error:

    The '<' operator is reserved for future use.
    

    In that case just type the command:

    cmd
    

    To switch to the cmd shell and then retype the command and it will work.

    c:\xampp\mysql\bin\mysql -u root -p my_database < my_database_dump.sql
    

    To get back to PowerShell type:

    exit
    

提交回复
热议问题