As for the above, password
field does not exist in my case and mysql throws an error.
This command helped:
INSERT INTO mysql.user (user, host, ssl_cipher, x509_issuer, x509_subject, plugin, authentication_string) VALUES ('user', 'localhost', '', '', '', 'mysql_native_password', PASSWORD('pass'));