MySQL scripts for core system