Import SQL file by command line in Windows 7

前端 未结 16 1475
攒了一身酷
攒了一身酷 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:55

    If you don't have password you can use the command without

    -u
    

    Like this

    C:\wamp>bin\mysql\mysql5.7.11\bin\mysql.exe -u {User Name} {Database Name} < C:\File.sql
    

    Or on the SQL console

    mysql -u {User Name} -p {Database Name} < C:/File.sql
    

提交回复
热议问题