Add MySQL Datasource

Codenvy supports use of MySQL databases. To bind a new MySQL database, go to Project > Datasources, click on ‘+’ icon and enter your new datasource name.

datasource

URL and Driver Class Name are the two most important fields.

com.mysql.jdbc.Driver

is the official JDBC driver for MySQL, while the url has the following format:

jdbc:mysql://hostname:port/dbname

Your project’s pom.xml file should have the below dependency:

<dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>5.1.6</version>
</dependency>