This snip was written for SnipSnap 0.42. SnipSnap 0.5 has MySQL support. This means you do not have to run de database creation commands. It is stil needed to create de mySQL User and add the correct librariesI have SnipSnap working on MySQL. There was no need to change the code. The installation is a bit more complex. Below is described what I did.
Create a mySQL database and a mySQL user (0.5 en 0.42).
Login in mysql with the
mysql command. Execute the following command
GRANT ALL PRIVILEGES ON *.* to snipsnap@'%'
IDENTIFIED by 'snipsnap' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.*
TO snipsnap@localhost IDENTIFIED
by 'snipsnap' WITH GRANT OPTION;
create database snipsnap;
use database snipsnap;
Now you have an user snipsnap with the password snipsnap. For security reasons you can choose other values.
Create the database structure (only 0.42).
Run the script
createdb.sql (the file can be found
here) with the following command.
Now you have the snip tables, a default snip and an user
admin with the password
snipsnap
Create a snipsnap application (only 0.42).
Now you can create snipsnap application with the standard installer. This application will use by default the mckoi database.
Add the correct libraries (0.42 and 0.5).
Copy the following libraries to the
applications<appname>WEB-INFlib directory:
- mysql.jar: The jdbc driver. You can download mysql.jar
here or from the official
MySQL Site.
- jdbcpool.jar: This library can be found in the sniplib directory. I do not know why this is needed, but otherwise it wil not work.
Change the configuration file (only 0.42)
Change the following values in the configuration file:
admin.login=snipsnap
admin.password=snipsnap
app.jdbc.url=jdbc:mysql://10.0.0.175/snipsnap
app.jdbc.driver=com.mysql.jdbc.Driver
Import default snips (only 0.42)
Restart snipsnap. Your application wil point to mySQL. Most if the standard information is gone. It must be reloaded.
- Login as admin with the password snipsnap (only 0.42).
- Go to the manager menu.
- Use import to import the export.xml.You can download this file from
here. This is an export off a just installed application.