sql 접속 에러
회사 웹서버를 백업하고 복원하는 중에 sql과 관련하여 다음과 같은 에러메시지가 출력됩니다.
Warning: mysql_connect(): Access denied for user: 'test@localhost' (Using password: YES) in /var/www/html/sejong.com/board/lib/db.php on line 13
test 라는 계정의 패스워드는 test 이며 콘솔에서는 정상적으로 접속됩니다.
[root@www sejongvill.com]# /usr/local/mysql/bin/mysql -u test -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 104 to server version: 4.0.18-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+------------+
| Database |
+------------+
| Bxxd |
| Bxxd |
| Bxxr |
| Txxa |
| bxxt |
| bxxd |
| exxe |
| mysql |
| txxh |
| zxxd |
+------------+
10 rows in set (0.00 sec)
mysql> use exxe;
Database changed
mysql> show tables;
+-----------------+
| Tables_in_eslee |
+-----------------+
| cxg |
| fxe |
| fxe |
| mxg |
| mxr |
| nxe |
+-----------------+
6 rows in set (0.00 sec)
콘솔로는 정상적으로 접속이 잘 되는데 왜 브라우저로 실행했을 때 정상적으로 DB에 접속이 안되는 걸까요?
[root@www sejongvill.com]# cat /etc/php.ini | grep register_global
; register_globals to be on; Using form variables as globals can easily lead
; register_globals = Off
register_globals = On
문제 해결을 어떻게 해야 하는지 답변 기다리겠습니다.
자작 답변입니다.
아~
바보 같이 디렉토리 안에 config 파일이 또 있는걸 못 봤었네요.
config 파일을 수정한 후 잘 접속이 됩니다.
인수인계의 중요성을 다시 한번 느끼게 됩니다.
:shock: :shock: :shock:
댓글 달기