Question

I need to setup a MySQL database for a DataNucleus properties file:

javax.jdo.PersistenceManagerFactoryClass=org.datanucleus.api.jdo.JDOPersistenceManagerFactory
datanucleus.metadata.validate=false

# Enable these lines if persisting to ODF
#javax.jdo.option.ConnectionURL=odf:file:tutorial.ods
#javax.jdo.option.Mapping=odf

# Enable these lines if persisting to RDBMS (HSQLDB)
javax.jdo.option.ConnectionDriverName=com.mysql.jdbc.Driver
javax.jdo.option.ConnectionURL=jdbc:mysql://myserver.com:3306/myDb
javax.jdo.option.ConnectionUserName=userName
javax.jdo.option.ConnectionPassword=password
# javax.jdo.option.Mapping=hsql
datanucleus.autoCreateSchema=true
datanucleus.validateTables=false
datanucleus.validateConstraints=false

Can anyone please tell me the steps on how to set it up for this particular purpose?

Was it helpful?

Solution

Since you have autoCreateSchema enabled, you do not need to create the schema. All you need to do is create the database itself. Install mysql if necessary, log in to mysql as root and then issue the create database command. If you do not have root access, consult the documentation or the administrator for your server. You can find many tutorials online for this task, please read them before asking further questions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top