add new user mysql native password code example
Example 1: alter user mysql native password
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<password>';
Example 2: mysql create user with mysql_native_password
CREATE USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'user'@'localhost';
FLUSH PRIVILEGES;