Windows XP 머신에 XAMPP 를 인스톨 했을 때에, 다음과 같은 에러가 표시됩니다.
구성에 정의된 대로 controluser에 연결하지 못했습니다.
XAMPP를 설치하기 전에 MySQL 데이터베이스를 설치하고 비밀번호를 입력했습니다.MySQL의 config.inc.php 비밀번호를 변경하여 입력했는데 다음 오류가 발생하였습니다.
<?php if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
$uri = 'https://'; } else {
$uri = 'http://'; } $uri .= $_SERVER['HTTP_HOST']; header('Location: '.$uri.'/xampp/'); exit; ?>
index.php에 접속하려고 하면 XAMPP 설치에 문제가 있는 것 같습니다.이 문제를 해결하려면 어떻게 해야 하나요?
질문에 대한 답변
- 브라우저에서 phpMyAdmin을 열고 루트로 로그인합니다.
- 다음 데이터베이스를 만듭니다.
phpmyadmin
- 라는 이름의 사용자를 만듭니다.
pma
웹 서버의 호스트 이름 또는 IP 주소로 “호스트”를 설정합니다(웹 서버와 MySQL이 같은 상자에 있는 경우 사용).localhost
패스워드를 메모하고, 새로운 유저에게 패스워드의 완전한 제어권을 부여합니다.phpmyadmin
데이터베이스입니다.이 사용자는 이 데이터베이스 이외의 다른 항목에 액세스할 수 없는 것이 좋습니다. - phpMyAdmin 설치 디렉토리로 이동합니다.이 디렉토리는 다음과 같습니다.
sql
. - 인
sql
라는 파일을 찾을 수 있습니다.create_tables.sql
텍스트 편집기에서 엽니다. - phpMyAdmin에서
phpmyadmin
데이터베이스를 클릭하고 “SQL” 탭을 클릭합니다. - 텍스트 전체를 복사/붙여넣기
create_tables.sql
텍스트 상자에 넣고 쿼리를 실행합니다. 를 엽니다.
config.inc.php
phpMyAdmin 설치 디렉토리에 파일을 저장하고 다음 행을 추가합니다(또는 기존 설정이 이미 있는 경우 변경).$cfg['Servers'][1]['pmadb'] = 'phpmyadmin'; $cfg['Servers'][1]['controluser'] = 'pma'; $cfg['Servers'][1]['controlpass'] = '<your password>'; // Note: The list below may grow as PMA evolves and more control tables are added // Use your common sense! Don't just blindly copypasta, look at what it means! $cfg['Servers'][1]['bookmarktable'] = 'pma_bookmark'; $cfg['Servers'][1]['relation'] = 'pma_relation'; $cfg['Servers'][1]['userconfig'] = 'pma_userconfig'; $cfg['Servers'][1]['table_info'] = 'pma_table_info'; $cfg['Servers'][1]['column_info'] = 'pma_column_info'; $cfg['Servers'][1]['history'] = 'pma_history'; $cfg['Servers'][1]['recent'] = 'pma_recent'; $cfg['Servers'][1]['table_uiprefs'] = 'pma_table_uiprefs'; $cfg['Servers'][1]['tracking'] = 'pma_tracking'; $cfg['Servers'][1]['table_coords'] = 'pma_table_coords'; $cfg['Servers'][1]['pdf_pages'] = 'pma_pdf_pages'; $cfg['Servers'][1]['designer_coords'] = 'pma_designer_coords';
파일을 저장하고 닫습니다.
중요 – PMA는 로그인 시 설정을 로드하고 평가하여 세션데이터에 저장합니다.이렇게 할 때까지 메시지가 표시되지 않습니다.
- phpMyAdmin에서 로그아웃한 후 다시 로그인합니다.
문제는 해결됐습니다.
Debian/Ubuntu(또는 다른 dpkg 기반 distro)를 사용하는 경우 다음 명령을 수행합니다.
sudo dpkg-reconfigure phpmyadmin
phpmyadmin 패키지에는 이 작업을 수행하기 위한 스크립트가 포함되어 있습니다.필요한 것은 권한을 가진 사용자뿐입니다.루트로 로그인하고 있는 경우 sudo는 필요 없습니다.
편집: 현재 phpmyadmin 사용자를 삭제해 보십시오.
“고급 기능을 위한 사용자” 및 “고급 phpMyAdmin 기능” 코드 블록 전체를 코멘트합니다.config.inc.php
.
최근에 MySQL Server 루트 비밀번호를 변경했습니까?응답이 YES인 경우 phpMyAdmin 콘솔 내의 오류/경고 원인입니다.문제를 해결하려면 phpMyAdmin의 config-db.php 파일을 편집하고 적절한 데이터베이스 비밀번호를 설정하기만 하면 됩니다.
첫 번째 답변은 내가 보기에 너무 많은 것을 망치는 것이고 두 번째 답변은 나에게 효과가 없었다.그래서:
Linux 기반 서버에서 파일은 보통 다음 위치에 있습니다.
/etc/phpmyadmin/config-db.php
또는 다음과 같이 입력합니다.
/etc/phpMyAdmin/config-db.php
예: ([내 파일]는 다음과 같이 생겼고, 나는 사용자를 에서 변경(My File)]으로 변경했습니다.phpmyadmin
로.admin
phpmyadmin을 통해 데이터베이스를 유지하기 위해 작성한 사용자 이름과 적절한 비밀번호를 입력합니다.
$dbuser='phpmyadmin'; $dbpass=''; // set current password between quotes ' ' $basepath=''; $dbname='phpmyadmin'; $dbserver=''; $dbport=''; $dbtype='mysql';
크레딧 : http://tehnoblog.org/phpmyadmin-error-connection-for-controluser-as-defined-in-your-configuration-failed/
Ubuntu 16.04에서 phpmyadmin으로 동작했습니다.
/etc/phmyadmin/config.inc.php를 편집하여 다음 두 줄을 변경했습니다.
$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = 'thepasswordgiventoroot';