Importing larger sql files into MySQL

前端 未结 14 2208
感情败类
感情败类 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:00

    The question is a few months old but for other people looking --

    A simpler way to import a large file is to make a sub directory 'upload' in your folder c:/wamp/apps/phpmyadmin3.5.2 and edit this line in the config.inc.php file in the same directory to include the folder name $cfg['UploadDir'] = 'upload';

    Then place the incoming .sql file in the folder /upload.

    Working from inside the phpmyadmin console, go to the new database and import. You will now see an additional option to upload files from that folder. Chose the correct file and be a little patient. It works.

    If you still get a time out error try adding $cfg['ExecTimeLimit'] = 0; to the same config.inc.php file.

    I have had difficulty importing an .sql file where the user name was root and the password differed from my the root password on my new server. I simply took off the password before I exported the .sql file and the import worked smoothly.

提交回复
热议问题