开发者

How to increase memory size for phpmyadmin

I am facing some problem when I am trying to import 开发者_开发知识库magento database on localhost. It just import 18 table but in actual it contain 383 approx table. It gives error given below

Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 2089674 bytes) in /usr/share/phpmyadmin/libraries/import.lib.php on line 253

How this problem will configure. Is there need to change php.ini?


use this :

c:\mysql\bin\> mysql -u username -p password database_name < filename.sql

to import using command line

or in php.ini

memory_limit = 256M

change this to some other larger value. But as Dan said using command line is preferable.


phpMyAdmin has been blowing memory limits on me lately (and I wasn't even importing/executing large amounts of data) so I've just tried the following in my config.inc.php

$cfg['MemoryLimit'] = '128M';

https://docs.phpmyadmin.net/en/latest/config.html#cfg_MemoryLimit


Try this http://dev.mysql.com/doc/refman/5.5/en/mysqlimport.html I was capable to import a 930 MB database.


You can change php.ini as other answers have mentioned. It can be ok on you localhost. But on webserver with more virtualhost you probably don't want to increase memory limit for all hosts (that's what directive in php.ini does).

To increse memory limit only for given virtualhost edit virtualhost settings. For example:

<VirtualHost *:443>
   #your virtualhost settings
   php_value memory_limit 64M #place any number you need
</VirtualHost>

Or, you can place the same php_value into your .htaccess file, but your virtualhost must allow to change this values.


I was the same problem with the migration of database.

Try to change configuration of export to build file with queries like this:

INSERT INTO tbl_name VALUES (1,2,3)

When I was creating queries like this one:

INSERT INTO tbl_name (col_A,col_B) VALUES (1,2,3), (4,5,6), (7,8,9)

queries were too big to allocate them in memory. When I changed it, there were a lot of small queries so there wasn't problem with memory.


In my case, it works by specifying pcre.jit=0 in the file php.ini.


Use this :

Edit your php.ini file: Change

memory_limit = 256M
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜