Terms DataSource and Database Connection Profile are interchangeably used by Eclipse. General guidelines for this procedure are available at Eclipse guidelines for creating a new database connection profile. The following section illustrates building of the MySQL Community Server DataSource backed by the sample database cleardb.
Navigate to Eclipse DataSource Explorer View of Eclipse JEE perspective. If you don’t see it, go to the menu Window | Show View | Data Management and select Data Source Explorer. Right-mouse click DataBase Connections and select New:
Select the profile type MySQL, enter cleardb as the name of the datasource and click Next:
Now select an existing DBMS Driver and provide Connection Details In the “New Connection Profile” dialog. If this is the first installation of MySQL Database Profile in your Eclipse workspace, you can NOT do that until you provide the location of the driver jar by clicking on the red-circled area next to the Driver combobox:
This will open the New Driver Definition dialog shown below:
Click on the Jar List and add the location on your disk of the mysql-connector-java-5.1.XX-bin.jar (see Sample Database - cleardb to obtain the download URL of the Jar):
Once the driver is defined, in the New Connection Profile dialog / “Specify a Driver and Connection Details” you should set the default values as shown below. However, you may need to provide your own password for MySQL root account. NOTE: By now your local MySQL server instance has to be up and running and contain cleardb schema (see Sample Database - cleardb for instructions on installing MySQL and configuring the cleardb)
Check your connection by clicking on TestConnection:
Expand the new DataSource profile - it should look like this: