MySQL disable case sensitivity

I faced the problem that MySQL has different default settings under Windows and Linux (more specifically Ubuntu). While my MySQL installation under windows didn’t use case sensitivity, I ran into problems under Linux. So I tried to disable this in Ubuntu. It’s quite straight forward:


Add this line to your my.cnf under /etc/mysql. However if you were using InnoDB like me you will run into troubles, since MySQL doesn’t recognize the currently used tables anymore. If fixed this by dropping the database and recreating it. Which didn’t work at first. I run into the following error:

Error Dropping Database (Can't rmdir '.test\', errno: 17

This problems appears, if there are any files in the mysql data folder, which do not map to a specific table or metadata. Since MySQL couldn’t resolve the existing tables anymore, I had to delete them manually:

sudo rm /var/lib/mysql/your_db/*

Afterwards I was able to normally delete the database (using the drop database command).

MySQL datasource using JBoss 7

It took me quite some time to get a datasource in JBoss 7 running, since there are many different blog posts about this but unfortunately only partly working. Here’s a step by step guide to achieve this:

JBoss 7 does not support MySQL by default, so we need to install a module and configure it.

  1. You can download the required module here (link from the JBoss Datasource Wiki).
  2. Now extract the contents (using 7zip for example) to your JBoss folder in modules. The final path will look something like “modules/com/mysql/main” and contain 3 files
  3. Now we need to configure our datasource. Open your JBoss configuration file. For a standalone version this will be “standalone/configuration/standalone.xml”. First we need to register our driver and secondly configure the datasource:
        <subsystem xmlns="urn:jboss:domain:datasources:1.0">
                <datasource jta="true" jndi-name="java:jboss/datasources/MysqlDS" pool-name="MysqlDS" enabled="true" use-ccm="false">
                    <driver name="com.mysql" module="com.mysql">

The datasource element allows you to configure your datasource parameters. In my example, we’re using a connection url pointing to a schema. Please make sure that you don’t use root username and password. This is just an example.

Install JBoss 7.1 and MySQL 5.5 on Ubuntu

My goal was to set up the latest JBoss version (7.1) and MySQL 5.5 working together. Specifically using a datasource. The installation of JBoss was more troublesome than expected, since you find many tutorial of older versions. Unfortunately, the configuration completely changed.

Installing MySQL 5.5
The installation itself is rather easy on Ubuntu (if you are happy with the version in the repository)

sudo apt-get install mysql-server

This will install mysql and also create a service, that can be started using

sudo etc/init.d/mysql start

To configure your installation specifically to your needs, modify the my.cnf located under
To make MySql reachable outside from your machine, you will need to replace the following line

#bind-address           =


#bind-address           =

Otherwise MySql will ONLY be reachable from localhost. This is fine, if you plan to run everything on your local machine (like JBoss and have a local database management tool installed like phpmyadmin).

Installing JBoss 7.1
This task seems so easy but since the configuration completely changed from last version, there are many false information on the net.

First download Jboss 7.1 and unzip it in your favourite directory. I used /opt/jboss71. So you will need to be root.

cd /home/youruser/downloads
sudo mkdir /opt/jboss71
sudo unzip /home/youruser/downloads/ /opt/jboss71/

Now if we want to avoid running jboss as a root user, we must create a new user and a corresponding group. Finally, we will give him the ownership of the jboss folder.

groupadd jboss  
useradd -s /bin/bash -g jboss jboss  
chown -R jboss:jboss /opt/jboss71

The final step is to create an init script. I haven’t found a satisfying solution as it highly depends on the distribution. You will find many scripts in the internet, which may or may not work on your distribution. Eventually I used one I found on stackoverflow. The starting works completely fine, though the shut down not at all.

So create a textfile named jboss in your jboss folder with the contents from this post and make it executable. Afterwards copy it to /etc/init.d as root user. Lastly, we will add it to upstart so that we don’t need to think about starting jboss each time.

nano /opt/jboss71/jboss
(Insert script from this <a href="" target="_blank">post</a>)
chmod +x jboss
sudo cp jboss /etc/init.d/jboss
sudo update-rc.d jboss defaults

You can now launch your jboss by typing
/etc/init.d/jboss start

Making JBoss accessible from outside your machine
If you are running the standalone config, modify the respective configuration file and replace the ip address on the public interface with

nano /opt/jboss71/standalone/configuration/standalone.xml
<interface name="public">
<inet-address value="${jboss.bind.address:}">

Please refer to this post.

Setup Jenkins and subversion on Ubuntu

I recently tried to set up a jenkins installation on my local ubuntu machine. It was rather easy and not as cumbersome as expected. Additionally I installed subversion to work with Jenkins.

My goal was to commit an existing maven project, which will be build on jenkins, tests inclusive.

Here’s a step-by-step guide:

Guide is based on the Ubuntu Wiki.

sudo apt-get install subversion

This will install subversion on your machine and also allow you to create repositories.

Afterwards create a new group subversion and add your user and the www-data user to it (if you are using apache2, otherwise leave this step).

sudo addgroup subversion
sudo adduser daniel subversion
sudo adduser www-data subversion

Now you will need to create a new folder with adequate permissions as your repository. Please note that your repository can have many projects in it. Of course, if you like to have separate version numbers, you will need to create different repositories for each project.

sudo mkdir /home/svn
cd /home/svn
sudo mkdir myproject

sudo svnadmin create /home/svn/myproject

cd /home/svn
sudo chown -R www-data:subversion myproject
sudo chmod -R g+rws myproject

You’ve successfully create your repository! You won’t be able to access it yet though. For the different access methods, refer to the ubuntu wiki page. I used the svn-protocol to make my repository remotely accessible (also for jenkins).

For each repository, you can manage your own user and password-list. Just edit the newly created conf/svnserve.conf file in your project directory. E.g. add user test with password test123 to your asvnserve.conf:

test = test123

Please note that you must take care of whitespaces. Otherwise your config will not work as expected.

To make your svn server running at startup, add the following config from Michal Wojciechowski to  /etc/init/svnserve.conf

To test your new repo, you can use the following command

sudo initctl start svnserve

Jenkins with Maven integration (coming soon)