Re: Java connection to local MySQL
Hi William,
Please consult the Connector/J documentation. Connection URL is explained here:
http://dev.mysql.com/doc/connector-j/en/connector-j-reference-configuration-properties.html. You can find plenty of examples in several other plages.
Basically what you need to start is a URL like this:
- "jdbc:mysql://[host][:port]/[database]"
Replace [host], [:port] and [database] accordingly. If the host name is not specified, it defaults to 127.0.0.1. If the port is not specified, it defaults to 3306, the default port number for MySQL servers. If the database name is not specified you should set it with Connection.setCatalog("[database]") after connecting.
Subject
Written By
Posted
February 01, 2015 05:53AM
Re: Java connection to local MySQL
April 27, 2015 01:43PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.