export large database mysql phpmyadmin

2019-01-25 08:27发布

I am using phpmyadmin on my windows os. I have a database with one table which has 100M records with the size of 20GB. I want to export this table and have the table.sql file. Whenever I try to do this, the size of the exported file is 0 bytes. When I check the apache error log, the following would show up:

Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 1066139648 bytes)

Any idea how to solve this problem?!

Thanks :)

5条回答
我欲成王,谁敢阻挡
2楼-- · 2019-01-25 08:36

MySQLDumper worked like a charm for me at my hosted website. I had to copy one database and "paste" it into a new database. In MySQLDumper, it isn't apparent right away how to do this, but the key is to create a new configuration file in MySQLDumper and that will allow you to copy/restore to different databases.

On the home screen in MySQLDumper, click Configuration, then Configuration Files. There is a text box at the top allowing you to create a new Configuration file. In there, put in the information for the second database you need (you created a connection to the first database when you install MySQLDumper). Save it. Then you can click Restore where you can select the dump of the first database and restore it in the second one.

This was a lifesaver. Thanks!

查看更多
等我变得足够好
3楼-- · 2019-01-25 08:42

increase

max_post_size

variable in php.ini file. Then you will be able to download it.

查看更多
在下西门庆
4楼-- · 2019-01-25 08:47

I would suggest to try using the command line and the mysqldump.exe utility, as suggested here

查看更多
做个烂人
5楼-- · 2019-01-25 08:51

If you have shared hosting and you are using GoDaddy Cpanel than they are providing you option to backup your database in following section.

Files => Backup => Download a MySQL Database Backup.

查看更多
Fickle 薄情
6楼-- · 2019-01-25 08:52

If you are on a shared hosting or you don't have access to shell, then use mysqldumper script; copy it to your server and start it in your browser under "yourDomain.com/path_to_mysqlumper/"

MySQLDumper is a PHP and Perl based tool for backing up MySQL databases. You can easily dump your data into a backup file and - if needed - restore it. It is especially suited for shared hosting webspaces, where you don't have shell access.

MySQLDumper is a PHP and Perl based tool for backing up MySQL databases. You can easily dump your data into a backup file and - if needed - restore it. It is especially suited for shared hosting webspaces, where you don't have shell access.

If you have shell access to your host servers (if provided by your host since not all shared server hosters give this access) then you may use SSH access like in this tutorial using Putty that you install and configure then import or export your databases like in this third tutorial.

查看更多
登录 后发表回答