Check out example codes for "alter user mysql native password". It will help you in understanding the concepts better.

Code Example 1

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<password>';

Learn ReactJs, React Native from akashmittal.com