Solved

mysql import/restore database from large mysqldump file

Posted on 2014-04-06
3
719 Views
Last Modified: 2014-04-10
running latest WAMP and associated components on win7 pro 64bit. mysql version 5.6.12.

I'm creating daily backups using mysqldump, which creates a growing 338,521kb file which zips to 42,507kb.

using phpmyadmin to import this file yields an error that file is too large.

I'm looking for a process/solution to this that I can have an admin execute.
tks
0
Comment
Question by:jsgould
3 Comments
 
LVL 5

Accepted Solution

by:
JurajUQU earned 250 total points
ID: 39981865
You can do it via commandline

mysql -u username -p database_name < file.sql
0
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 250 total points
ID: 39981868
Typically PHP uploads are limited to 8 MB in 'php.ini'.  There is also the issue of the upload timing out if it is too large.  You need to change 'post_max_size', 'upload_max_filesize', and probably 'memory_limit' and 'max_execution_time'.

The alternative is to use the 'mysql' command line to do the import.  Log in as 'root' and use '< backup.sql' to restore everything that was dumped.  http://dev.mysql.com/doc/refman/5.6/en/mysql-batch-commands.html

Also from http://dev.mysql.com/doc/refman/5.6/en/copying-databases.html :
You can also use mysqldump and mysqlimport to transfer the database.
0
 

Author Closing Comment

by:jsgould
ID: 39992259
thks
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question