Fixed database issues in mysql script.
Merge remote-tracking branch 'origin/develop' into develop