On 10/17/2012 12:29 AM, Romita Saha wrote:
Hi Dave,

I followed your guidance and loaded my database in MySQL. Presently the
url reads like this:

url = "jdbc:mysql://localhost:8983/var/lib/mysql/camerasys"

The bin address in my.cnf file is :
bind-address = 127.0.0.1

However the issue still persists.  Kindly help me find out the issue. The
error log is stated below.

Caused by: com.mysql.jdbc.CommunicationsException: Communications link
failure due to underlying exception:

Typically MySQL listens on port 3306, and if you haven't changed it from the default, you shouldn't even need to include it. Your URL then needs to have the name of the database (schema), not the path to where MySQL is storing it.Port 8983 is Solr's port if you run under the included jetty container.

It looks like you probably can use this, assuming you named the database camerasys:

url="jdbc:mysql://localhost/camerasys"

Here's how my dataimport source is defined. I pass the database host and schema in via the dataimport request URL, and I include the port number even though I don't have to:

  <dataSource type="JdbcDataSource"
    driver="com.mysql.jdbc.Driver"
    encoding="UTF-8"
url="jdbc:mysql://${dataimporter.request.dbHost}:3306/${dataimporter.request.dbSchema}?zeroDateTimeBehavior=convertToNull"
    batchSize="-1"
    user="ncprod_ro"
    password="REDACTED"/>

Thanks,
Shawn

Reply via email to