[CONCR-3] Rewrite mysql module to use own implementation