>Are the JDBC classes in the classpath?
On the classpath I have defined, the property id: db.driver.classpath
pointing to the
following jar files:
mysql-connector-java-3.1.11-bin.jar
commons-collections-2.1.jar
commons-dbcp-1.2.jar
commons-logging-1.0.4.jar
commons-pool-1.2.jar
I have no problem for executing non administrative task for example if I
execute the script for creating the database by hand, then I cant invoke the
sql task for creating the tables using the following parameters:
<sql
classpathref="db.driver.classpath"
driver ="org.gjt.mm.mysql.Driver"
url ="jdbc:mysql://localhost/cac"
userid ="dev"
password ="dev00"
src ="create-tables.sql""
print ="true"
output ="${build.log.dir}/db.out"
/>
Now the URL syntax should have the name of the database at the end, but what
about an administrative
task for example for creating the database cac it self?
Thanks,
David Leal
-----Mensaje original-----
De: Guru Balse [mailto:[EMAIL PROTECTED]
Enviado el: martes, 29 de noviembre de 2005 19:55
Para: [EMAIL PROTECTED]
Asunto: Re: Url Syntax for invoking adminitrative task on mysql database
Are the JDBC classes in the classpath?
David wrote:
> Dear memebers,
>
> I am using the following task for invoking some administrative task on
mysql
> database, but I guess the syntax is not properly for the
> <sql
> classpathref ="db.driver.classpath"
> driver ="${db.driver}"
> url ="${db.admin.url}"
> userid ="${db.admin.username}"
> password ="${db.admin.password}"
> src ="${sql.dir}/create-database-${db.driver.name}.sql"
> print ="true"
> output ="${build.log.dir}/db.out"
> />
>
> where:
> db.admin.url = jdbc:mysql://localhost:3306
>
> If I run this, I get the following error:
>
> BUILD FAILED
>
> P:\SLZ\AMENA-CC\build.xml:276: java.sql.SQLException: No suitable Driver
for
> jdbc:mysql://localhost:3306
>
> Total time: 1 second
>
> So, probably I am making some mistake on the url definition, do you have
any
> idea about how to define for sucha administrative task?
>
> the script file look like this:
>
> -- creates the database (called 'cac'), (sans relations)
> -- for MySQL 4.1 or later
>
> CREATE DATABASE cac;
> USE cac;
> -- creates the default dev user and grants a set of privileges to said
> user...
> GRANT USAGE ON *.* TO dev@'localhost' IDENTIFIED BY 'dev00';
> GRANT ALL PRIVILEGES ON *.* TO 'dev'@'localhost' IDENTIFIED BY 'dev00'
> -- GRANT DROP ON *.* TO dev@'localhost';
> -- GRANT SELECT ON *.* TO dev@'localhost';
> -- GRANT INSERT ON *.* TO dev@'localhost';
> -- GRANT UPDATE ON *.* TO dev@'localhost';
> -- GRANT DELETE ON *.* TO dev@'localhost';
> -- GRANT CREATE ON *.* TO dev@'localhost';
> -- GRANT REFERENCES ON *.* TO dev@'localhost';
> -- GRANT INDEX ON *.* TO dev@'localhost';
> -- GRANT ALTER ON *.* TO dev@'localhost';
> -- GRANT CREATE TEMPORARY TABLES ON *.* TO dev@'localhost';
> -- GRANT LOCK TABLES ON *.* TO dev@'localhost';
> -- GRANT EXECUTE ON *.* TO dev@'localhost';
>
> Thanks,
>
> David
--
Guru Balse
Oracle - Server Technologies - iAS Integration QA
Work: 650.506.1611 (1op668 - HQ)
************************* AVISO LEGAL *************************
Este mensaje y sus documentos anexos son privados y confidenciales y están
dirigidos exclusivamente a sus
destinatarios. Si por error, ha recibido este mensaje y no se encuentra entre
los destinatarios, por favor, no use,
informe, distribuya, imprima o copie su contenido por ningún medio. Le rogamos
lo comunique al remitente y
borre todo su contenido.
La empresa no asume ningún tipo de responsabilidad legal por el contenido de
este mensaje. Cualquier opinión
manifestada en él pertenece sólo al autor y no representa necesariamente la
opinión de la compañía salvo que
expresamente se especifique lo contrario.
************************* DISCLAIMER **************************
This message and its attached files may contain confidential and/or privileged
information. If you are not the
addressee or authorized to receive this for the addressee, you must not use,
copy, disclose, or take any action
based on this message or any other information herein. If you have received
this message in error, please notify
the sender immediately by reply e-mail and delete this message.
The company does not assume any legal responsability for the contents of this
message. Any opinion contained
in it belongs exclusively to its author and does not necessarily represent the
company's opinion unless it is
specifically expressed on the contrary.