Import SQL file by command line in Windows 7

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

    mysql : < (for import) > (for export)

    in windows, you want to take backup or import the sql file, then goto cmd prompt type the address were the mysql is installed eg:C:\Program Files (x86)\MySQL\MySQL Server 5.6\bin> after this

    C:\Program Files (x86)\MySQL\MySQL Server 5.6\bin> mysql -u UserName -p Password DatabaseName < FileName.sql (import)

    C:\Program Files (x86)\MySQL\MySQL Server 5.6\bin> mysql -u UserName -p Password DatabaseName > FileName.sql (export)

提交回复
热议问题