저는 Mac OSx 10.6을 사용하며 MySql db와 함께 Tomcat 7 서버를 사용하려고합니다. 내의 context.xml 파일 :MySql이 포함 된 Tomcat 7
<?xml version='1.0' encoding='utf-8'?>
<Context>
<Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource"
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
maxActive="100" maxIdle="30" maxWait="10000"
username="javauser" password="javadude" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/javatest"/>
</Context>
그리고 내 배포 설명 :
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" id="WebApp_ID" version="2.4">
<display-name>Love Finder</display-name>
<servlet>
<servlet-name>customer</servlet-name>
<servlet-class>com.neya.love.finder.pl.CustomerServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>customer</servlet-name>
<url-pattern>/customer.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/TestDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
나는 테이블 javatest
을 가지고 있지만 메이크업 연결이 dB로 때이 예외가 :
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (null, message from server: "Host '192.168.0.100' is not allowed to connect to this MySQL server")
수있는 사람의 도움을 나를?
없음 스킵 네트워킹 댓글되지 –