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

Code Example 1

ALTER USER 'user-name'@'localhost' IDENTIFIED BY 'NEW_USER_PASSWORD';FLUSH PRIVILEGES;

Code Example 2

SET PASSWORD FOR 'user-name'@'localhost' = PASSWORD('NEW_USER_PASSWORD');FLUSH PRIVILEGES;

Code Example 3

ALTER USER 'root'@'localhost' IDENTIFIED BY 'PASSWORD';

Learn ReactJs, React Native from akashmittal.com