Added permission for commands, fixed mysql is not synchronized