logo

Black Friday
Sale

  •  99.9% 가동시간
  •  무료 SSL 인증서
  •  24/7 라이브 지원
  •  30일 환불 보증
시작하기

최대

90

%

OFF

04
15
16
53
블랙프라이데이 세일: 웹호스팅
시작 요금 895원 /월!
전체 상품 보기
×

지식 창고

호스팅어의 호스팅 서비스와 관련된 정보글, 문제 해결 가이드,
기타 전문 정보글을 검색하세요.

How to install Magento by bypassing SHOW DATABASES privilege

Modified on:
bypass install magento show databases

"SHOW DATABASES" is disabled on Hostinger for security reasons. In order to install Magento you need to edit one of the scripts files in the installation folder to bypass the show databases privilege. Here's what you need to do:

1. Open your website's File Manager and navigate to setup/src/Magento/Setup/Validator/DbValidator.php 2. Right click the file via your File Manager and select Edit. Locate the line containing "$query = "SHOW DATABASES";". You will need to comment out the following lines (add a // at the beginning of each line) as shown in the example: 

{
// $query = "SHOW DATABASES";
// $accessibleDbs = $connection->query($query)->fetchAll(\PDO::FETCH_COLUMN, 0);
// foreach ($accessibleDbs as $accessibleDbName) {
// if ($dbName == $accessibleDbName) {
// return true;
// }
// }
// throw new \Magento\Setup\Exception(
// "Database '{$dbName}' does not exist "
// ."or specified database server user does not have privileges to access this database."
// );
}