Import SQL file by command line in Windows 7

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

    To import SQL file what works for me

    For Wamp-Server

    1. Find mysql in wamp. In my computer it's location is "C:\wamp64\bin\mysql\mysql5.7.21\bin"

    Open cmd and once you get inside bin you have to write " mysql -uroot -p database_name < filename.sql"

    remember to put sql file under bin.

    in nutshell you have to do this:-

    C:\wamp64\bin\mysql\mysql5.7.21\bin>mysql -uroot -p database_name < filename.sql

    After this, it will ask for the password, mine password was nothing(BLANK).

    hope it helps someone.

提交回复
热议问题