Refactor + Use local mysql server when remoteReader is specified