Just look in the MySQL JDBC driver documentation for the proper syntax.
21.3.5.1. Driver/Datasource Class Names, URL Syntax and Configuration Properties for Connector/J
...
JDBC URL Format
The JDBC URL format for MySQL Connector/J is as follows, with items in square brackets ([, ]) being optional:
jdbc:mysql://[host][,failoverhost...][:port]/[database] »
[?propertyName1][=propertyValue1][&propertyName2][=propertyValue2]...
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.
jdbc:mysql://[host:port],[host:port].../[database] »
[?propertyName1][=propertyValue1][&propertyName2][=propertyValue2]...
Here is a sample connection URL:
jdbc:mysql://localhost:3306/sakila?profileSQL=true
Yours is thus clearly wrong. The presence of :thin
suggests that you were incorrectly reading the Oracle JDBC driver documentation instead of the MySQL one. Use the following JDBC URL:
String url = "jdbc:mysql://www.websiteName.net:2222/dbPersons";
And obtain the connection as follows:
Connection connection = DriverManager.getConnection(url, user, pass);
The SQLException: No suitable driver
simply means that the given JDBC connection URL is not recognized by any of the so far loaded drivers. So apart from the wrong connection URL, another possible cause is that the JDBC driver supporting the URL isn't been loaded at all.
See also: