← Back to team overview

syncany-team team mailing list archive

MySQL and others as Database Backend


Hey guys,

Syncany uses Derby embedded as its main database, but since it uses
JPA, it can be used with any other database. For testing purposes I
always use a MySQL database. That makes it easier to look at what's
going on.

All you have to do is add a few lines to the config.xml and add the
connector-JAR archive (e.g. mysql-connector) to the libraries. For
MySQL, add the following to ~/.syncany/config.xml. This will overwrite
all values of the META-INF/persistence.xml:

		<property name="javax.persistence.jdbc.url"
		<property name="javax.persistence.jdbc.password" value="syncany"/>
		<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
		<property name="javax.persistence.jdbc.user" value="syncany"/>
		<property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>

Happy coding!