이런저런 방법 다 해도 도저히 알 수가 없어... 글 올립니다....
환경 : 윈 2003
웹서버 : IIS6.0
PHP5, MYSQL5 (PHP Setup for iis ->apmsetup.com)에서 다운 받아 사용.
이런 환경에서 DB연결하려고 작업을 하는데...도저히 ERROR가 나서...
진행이 안됩니다.....
프로그램 소스 ---------
<?
$hostName = "ip주소";
$userName = "testuser";
$userPassword = "123456";
$dbName = "testdb";
$conn = mysql_connect($hostName,$userName,$userPassword);
$db = mysql_select_db($dbName);
?>
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
</head>
<body>
test
<?
$qry = "insert into testtable (name, tel) values ('홍길동','123-4567-1919')";
mysql_query($qry);
?>
</body>
</html>
오류메시지 ----------------------------
Warning: mysql_connect() [function.mysql-connect]: Host 'server-e' is not allowed to connect to this MySQL server in C:\web\phptest\index.php on line 10
Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\web\phptest\index.php on line 14
Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in C:\web\phptest\index.php on line 14
test
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\web\phptest\index.php on line 30
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\web\phptest\index.php on line 30
DB관련부분은 모두 오류입니다.
php.ini에서 extension=php_mysql.dll의 주석도 제거하고
윈도우 system32폴더에 libmysql.dll도 복사해 두었습니다.
아무리 해도 위의 오류가 계속 나타납니다....아시는 분들좀 도와주세요....
|