Replaced mysql tables

Fixed update permissions issue