
CREATE SCHEMA account;

DROP TABLE IF EXISTS account.user;
CREATE TABLE account.user
SELECT 'proxy' mysql_user, 'test-user' user, '1234' password;

DROP USER ''@'%';
CREATE USER ''@'%' IDENTIFIED WITH proxy_auth;
GRANT USAGE ON *.* TO ''@'%';

DROP USER 'proxy'@'%';
CREATE USER 'proxy'@'%' IDENTIFIED BY '123456';
GRANT USAGE ON *.* TO 'proxy'@'%';
GRANT PROXY ON 'proxy'@'%' TO ''@'%';

-- SELECT mysql_user FROM user WHERE user = #user AND password = #pass

