How do I specify a port when accessing a MySQL database?

Highlighted
Paul_Masurel
Level 2
How do I specify a port when accessing a MySQL database?
The server is listening on port 3315.

There is no field named port in the form, and if input it in the host field as

"myhost:3315"



I get the following error:

"Connection failed: Failed to connect: Cannot load connection class because of underlying exception: 'java.lang.NumberFormatException: For input string: "3324:3306"'., caused by: NumberFormatException: For input string: "3324:3306""
0 Kudos
3 Replies
Clément_Stenac Dataiker
Dataiker
Re: How do I specify a port when accessing a MySQL database?

Hi,



Unfortunately, we forgot to add this option in the UI. As a workaround, you can create the connection and then edit the DATA_DIR/config/connections.json file and add a




"port": 3315


entry in the "params" entry of your connection.

0 Kudos
Highlighted
Paul_Masurel
Level 2
Author
Re: How do I specify a port when accessing a MySQL database?
Alternatively people can also use the jdbc connector, and still select the MySQL dialect.
0 Kudos
Highlighted
jrouquie Dataiker
Dataiker
Re: How do I specify a port when accessing a MySQL database?
Also note that this has been fixed in version 2.1
0 Kudos