Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
-- Find users with no password SELECT user, host, authentication_string FROM mysql.user WHERE authentication_string = '' OR authentication_string IS NULL; -- Remove anonymous users DELETE FROM mysql.user WHERE user = ''; -- Remove remote root access DELETE FROM mysql.user WHERE user = 'root' AND host != 'localhost'; -- Remove test database DROP DATABASE IF EXISTS test; FLUSH PRIVILEGES;
Result
Open