php.ini 수정 - upload_max_filesize, memory_limit, post_max_size 증가
phpMyAdmin에서 외부 Mysql DB를 가져오기 하기 할떄 아래와 같은 메세지가 나왔다.
너무 큰 파일을 업로드하려고 시도했습니다. 제한을 해결하기 위해서는 documentation를 참조하여 주십시오.
Starting with version 2.7.0, the import engine has been re–written and these problems should not occur. If possible, upgrade your phpMyAdmin to the latest version to take advantage of the new import features.
The first things to check (or ask your host provider to check) are the values of upload_max_filesize, memory_limit and post_max_size in the php.ini configuration file. All of these three settings limit the maximum size of data that can be submitted and handled by PHP. One user also said that post_max_size and memory_limit need to be larger than upload_max_filesize. There exist several workarounds if your upload is too big or your hosting provider is unwilling to change the settings
해당 문서를 확인해보니 php.ini의 upload_max_filesize, memory_limit and post_max_size 를 더 증가시켜야한다고 한다.
일단 whereis로 php.ini가 어디있는지 찾는다.
#whereis php
찾은 php.ini파일을 일단 백업하고 아래와 같이 수정작업 ㄱㄱ
memory limit은 무제한으로 하기 위해 -1로 설정했다.
; Maximum allowed size for uploaded files.
; http://www.php.net/manual/en/ini.core.php#ini.upload-max-filesize
upload_max_filesize = 200M
; Maximum amount of memory a script may consume (128MB)
; http://www.php.net/manual/en/ini.core.php#ini.memory-limit
memory_limit = -1
; Maximum size of POST data that PHP will accept.
; http://www.php.net/manual/en/ini.core.php#ini.post-max-size
post_max_size = 300M
그리고 http 서비스를 재시작해서 변경사항을 반영하였다.
service httpd restart
이제 정상적으로 큰 사이즈 DB도 가져오기 가능해졌다.