--error 0,ER_CANNOT_USER DROP USER otto@'localhost'; CREATE USER otto@'localhost'; GRANT PROCESS ON *.* TO otto@'localhost'; GRANT PROCESS ON *.* TO ''@'localhost'; --echo ---- Establish connection otto (user=otto) ---- connect (otto,localhost,otto,,test); --echo ---- Establish connection anonymous (user=''=) ---- connect (anonymous,localhost,'',,test); SHOW GRANTS; SHOW processlist; SELECT * FROM information_schema.processlist; --echo ---- Switch to connection otto ---- SHOW GRANTS; SHOW processlist; SELECT * FROM information_schema.processlist; --echo ---- Switch to connection default ---- connection default; REVOKE PROCESS ON *.* FROM otto@'localhost'; REVOKE PROCESS ON *.* FROM ''@'localhost'; --echo ---- Close connections otto + anonymous and establish them again ---- disconnect otto; disconnect anonymous; --echo ---- Establish connection otto (user=otto) ---- connect (otto,localhost,otto,,test); --disable_abort_on_error SHOW GRANTS; SHOW processlist; SELECT * FROM information_schema.processlist; --enable_abort_on_error --echo ---- Establish connection anonymous (user=''=) ---- connect (anonymous,localhost,'',,test); --disable_abort_on_error SHOW GRANTS; SHOW processlist; SELECT * FROM information_schema.processlist; --enable_abort_on_error --echo ---- Switch to connection default + close other connections ---- connection default; DROP USER otto@'localhost'; disconnect otto; disconnect anonymous;