I am trying to use the following command to create a mysql connection pool in GlassFish but it keeps telling me Command create-jdbc-connection-pool
failed.
Please help me.
The command:
asadmin create-jdbc-connection-pool \
--datasourceclassname com.mysql.jdbc.jdbc2.optional.MysqlDataSource \
--restype javax.sql.DataSource \
--property "User=root:Password=...:URL=jdbc\:mysql\:\/\/localhost:3306\/wcms_3" \
connection_pool
I guess that there is a missing required parameter; so what are the required parameters needed if my guess was true?
Maybe it's a typo but referring to this blog only the URL-part of the --property
has to be surrounded by double quotes, such as:
asadmin create-jdbc-connection-pool
--datasourceclassname oracle.jdbc.pool.OracleDataSource
--restype javax.sql.DataSource
--property user=dbuser:password=dbpassword:url="jdbc\\:oracle\\:thin\\:@localhost\\:1521\\:ORCL" oracle-pool
Furthermore notice the use of escape characters in this example.
Check out this blog post:
Alternatively, to circumvent escaping woes have a look here:
--property user=root:password=test:DatabaseName=test:ServerName=localhost:port=3306
ie, specify the connection without using a JDBC URL.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With