Import SQL file by command line in Windows 7

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

    TRY THIS

      C:\xampp\mysql\bin\mysql -u {username} -p {databasename} < {filepath}
    

    if username=root ,filepath='C:/test.sql', databasename='test' ,password ='' then command will be

      C:\xampp\mysql\bin\mysql -u root  test < C:/test.sql
    

提交回复
热议问题