phpMyAdmin无法导出数据库 [英] phpMyAdmin can't export database

查看:388
本文介绍了phpMyAdmin无法导出数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台VPS计算机,我安装了phpMyAdmin并将数据库插入其中.但是现在当我要进行备份并导出数据库时,它说:

I have a VPS machine and I installed phpMyAdmin and inserted the database in. But now when I want to make a backup and export the database, it says:

以下是错误日志: http://pastebin.com/44N4YcAk

[2013年6月18日星期二21:40:16] [错误] [客户端] PHP致命错误:/usr/share/phpmyadmin/libraries/tcpdf/中允许的16777216字节内存耗尽(试图分配491520字节) tcpdf.php

[Tue Jun 18 21:40:16 2013] [error] [client] PHP Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 491520 bytes) in /usr/share/phpmyadmin/libraries/tcpdf/tcpdf.php

推荐答案

您不应为此使用phpmyadmin,而应使用mysqldump.在命令行中

you should not be using phpmyadmin for this, you should be using mysqldump. from the command line its

mysqldump -uMYSQL-USER -h server -pMYSQL-USER database_name > /path-to-export

来自php脚本

$command = "mysqldump -uMYSQL-USER -h server -pMYSQL-USER database_name > /path-to-export/file.sql";
exec($command, $output, $return_var);

这很容易通过cronjob自动化

this is easy to automate with a cronjob

这篇关于phpMyAdmin无法导出数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆