This content has been marked as final.
Show 1 reply
-
1. Re: Mysql Database Connection Problem Seam
jazir1979 Dec 20, 2007 4:43 PM (in response to vikramchhetryy)
This could mean you haven't GRANTed the MySQL user connect privileges, eg:
GRANT ALL PRIVILEGES ON abc.* TO 'abc'@'localhost' IDENTIFIED BY 'xyz';
Also try substituting localhost with * if you want to connect from other machines."vikramchhetryy" wrote:
Hi All,
I am trying to create a new application in seam my problem is that i am not able to connect to the database.
my connection xml looks like this:-<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE datasources PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN" "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd"> <datasources> <local-tx-datasource> <jndi-name>AbcDatasource</jndi-name> <connection-url>jdbc:mysql://127.0.0.1/abc</connection-url> <driver-class>com.mysql.jdbc.Driver</driver-class> <user-name>abc</user-name> <password>xyz</password> <!-- <exception-sorter-class-name> org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter </exception-sorter-class-name> <metadata> <type-mapping>mySQL</type-mapping> </metadata> --> </local-tx-datasource> </datasources>
The error I get is :-
java.sql.SQLException: Server configuration denies access to data source
I have tried many combinations for mysql connect url like
jdbc:mysql://127.0.0.1:3306/abc
I am using :-
Suse 10.0
mysql4.1
seam2.0
jboss 4.2.2
ant1.6
eclipse europa
mysql-connector-java-3.0.9-stable-bin.jar
i am not sure if i am using right connection jar.
Any help would be appreciated.
Regards,
Vikram