-
-
Notifications
You must be signed in to change notification settings - Fork 7
MySQL Database
Clownfish CMS uses a MySQL database for the backend data. You can use a locally installed instance or for better performance a remote instance on a dedicated server.
Clownfish CMS has been tested with version 5.7 of MySQL. Download this version for your operating system from https://dev.mysql.com/downloads/mysql/5.7.html. Install it on your server with your password for the root user.
With a local MySQL instance on your Clownfish installation, you don't have to worry about any further setup.
If you want to connect Clownfish CMS to a remote instance of MySQL you have to give access to the root user from all hosts. First locate the mysqld.cnf file (Linux at /etc/mysql/mysql.conf.d/mysqld.cnf) and set the bind-address to the database server IP address or * for all hosts. You also have to create a root user who has access from all hosts. You can use the mysql command line tool.
mysql -u root -p
> your root password
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'your root password';
UPDATE `mysql`.`user` SET `Grant_priv` = 'Y' WHERE `User` = 'root';
FLUSH PRIVILEGES;
\q
service mysql restart
On the Clownfish server you have to edit the application.properties file. Edit the app.datasource.urlroot, app.datasource.url and the app.datasource.url entries.
bootstrap=1
app.datasource.driverClassName=com.mysql.jdbc.Driver
app.datasource.urlroot=jdbc\:mysql\://your_mysql_server\:3306?zeroDateTimeBehavior\=convertToNull&serverTimezone\=UTC
app.datasource.root=root
app.datasource.url=your_root_password
app.datasource.url=jdbc\:mysql\://your_mysql_server\:3306/clownfish?zeroDateTimeBehavior\=convertToNull&serverTimezone\=UTC
app.datasource.username=clownfish
app.datasource.password=clownfish
server.servlet.session.timeout=7200s
logging.level.org.apache.tomcat=ERROR
server.tomcat.accesslog.enabled=true
logging.level.org.apache.catalina=ERROR
For security reasons, you should revoke the GRANT after the first run of the Clownfish CMS. The bootstrap mechanism sets up all data and afterwards it is not necessary any more.
After setting up your database you can start the Clownfish server for the first run:
java -jar clownfish-VERSION-SNAPSHOT.war
The console output should show two BOOTSTRAPPING entries and after finishing the setup you are able to call the website http://yourclownfish-ip:9000
Welcome to Clownfish CMS!