Sunday, 7 September 2014

Connecting MySQL database with Servoy

Hello All,


This tutorials is for new developers into the world of servoy.

While learning servoy must must have gone through this line. "We can connect servoy to any back-end database and same code base will work for any database you connect". That is TRUE and it is very easy to connect databases with servoy. Just we need some information to connect it..

In this article, I am going to show you how we can connect MySQL with servoy.


Please follow the steps :

1) Create a new schema in MySQL. (lets say test).
2) Right click on the 'Database Server' icon in Servoy and select 'Connect to existing database' option then select MySQL .
3) This will open you the connection page , where you need to give
- Server Name (any name you want to be displayed in Servoy IDE),
- User name (as for MySQL),
- Password,
- URL(jdbc:mysql://localhost/test),
- Driver(org.gjt.mm.mysql.Driver),
- Catalog(<none>),
- Scheme(<none>),
- Next 4 option leave it alone as default,
- Validation Type(query validation),
- Validation Query(SELECT 1;),
- Rest leave it as it is.

4) Download and put the driver at (as not shipped with servoy): /path/to/application_server/drivers/
5) After placing the driver, restart the developer/server. (NB: If the driver field in connection page is shown in red then driver is missing)
6) Save the page, check the connection and DONE!!



Hope this will help you when you need to go out of default PostgresSQL as your back-end database.

Thanks,
Sovan Misra

Mindfire Solutions

No comments:

Post a Comment