Re: R: R: App + ConnectorJ + MXJ deployment

Eric Herman <[email protected]>
Newsgroups gmane.comp.db.mysql.java
Message-ID <1159260658.13320.8.camel@localhost>
Hi Roberto,

On Mon, 2006-09-25 at 17:18 +0200, tech wrote:
> Hi Eric, 
> 
> which port? 
> The 3306 or 3336 ?  

Whatever port you like. The important thing is that the JDBC URL should
match the port that mysql was assigned.

>From the source you sent earlier, you have:

>     private int port = 3336; 
...
>     database_options.put("port", Integer.toString(port));

So in your case the jdbc connection string should look something like:

      String jdbcUrl = "jdbc:mysql://localhost:" + port + "/" + ...

Since you already have "int port" defined above, just use it in both
places.

Cheers,
- Eric

P.S.: There's nothing magic about any of the numbers. They default port
for mysql is 3306. However, you may wish to choose a different port to
avoid conflicts with another mysql that may be installed on the system. 

http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers

> 
> Cheers 
> Roberto 
> 
> 
> 
> -----Messaggio originale-----
> Da: Eric Herman [mailto:[email protected]] 
> Inviato: lunedì 25 settembre 2006 14.03
> A: tech
> Cc: [email protected]
> Oggetto: Re: R: App + ConnectorJ + MXJ deployment
> 
> Hi Roberto,
> 
> At first glance, the only serious issue I see is that it looks like the
> port was forgotten in the JDBC URL connection string:
> 
> > dbConn = DriverManager.getConnection("jdbc:mysql://localhost/" +
> > DATABASE + "?user=" + USERID + "&password=" + PASSWORD); 
> 
> That should really look more like:
> 
> "jdbc:mysql://localhost" + port + "/" + ...
> 
> 
> 
> 
-- 
Eric Herman, Software Developer
MySQL AB, www.mysql.com
VoIP Ext: 6594   US: +1 408 213 6540  Europe: +46 18 174 400
Mobile: +31 [0]6-20719662
Are you MySQL certified?  www.mysql.com/certification


-- 
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.