fixing mysql issues