add MySQL compatibility

This is the patch that we agreed with Diego. It's the less amount of change I need to make CRAB3 frontend compatible with MySQL