Importing larger sql files into MySQL

前端 未结 14 2147
感情败类
感情败类 2020-12-12 10:45

I have a 400MB large sql backup file. I\'m trying to import that file into MySQL database using WAMP->import, but the import was unsuccessful due to many reasons such as upl

14条回答
  •  时光说笑
    2020-12-12 11:12

    I believe the easiest way is to upload the file using MYSQL command line.

    using the command from the terminal to access MySQL command line and run source

        mysql --host=hostname -uuser -ppassword
        source filename.sql 
    

    or directly from the terminal

       mysql --host=hostname -uuser -ppassword < filename.sql
    

    at the prompt

    I found this link How to upload big sql dump files (memory, HTTP or timeout problems) in MYSQL. it give the outline of what to do to upload a large SQL. It helped me when I got face with a client 196mb sql dump. Something the PHPMySql couldn't handle.

提交回复
热议问题