ER_HOST_NOT_PRIVILEGED: Host 'DESKTOP-QV7GL7U' is not allowed to connect to this MySQL server mysqlworkbench code example
Example: host is not allowed to connect to this mysql server
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' WITH GRANT OPTION;
CREATE USER 'username'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;