简体   繁体   English

如何将大型mysql数据库表导出到Excel

[英]How to export large mysql db table to excel

I'm trying to export a large mysql table (~25000 rows) to excel using phpexcel. 我正在尝试使用phpexcel将大型mysql表(〜25000行)导出到excel。 But when I run the query to pull the data from the database, I get the following error: 但是,当我运行查询以从数据库中提取数据时,出现以下错误:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 64 bytes) 致命错误:耗尽了134217728字节的允许内存大小(尝试分配64字节)

I would assume I should change my memory_limit value but I don't know what a reasonable value for this should be and I know that something like: 我以为我应该更改我的memory_limit值,但我不知道该值应该是什么,我知道类似以下内容:

ini_set('memory_limit', -1);

is not a good idea... 这不是一个好主意...

What's the best approach to this situation? 解决这种情况的最佳方法是什么?

I'm sorry for my English (I speak Spanish) You could use excel for MySQL and do what you want 对不起我的英语(我说西班牙语),您可以将excel用于MySQL并执行您想要的操作

You can refer the following link 您可以参考以下链接

http://www.mysql.com/why-mysql/windows/excel/ http://www.mysql.com/why-mysql/windows/excel/

Did you try phpmyadmin? 您尝试了phpmyadmin吗? I have used phpmyadmin to export a table with around 12000 records to excel sheet.. 我已使用phpmyadmin将具有12000条记录的表导出到Excel工作表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM