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

Code Example 1

-- In case the UPDATE command returns "Column 'Password' is not updatable" run
ALTER USER 'root'@'localhost' IDENTIFIED BY 'newPassword';
flush privileges;

Learn ReactJs, React Native from akashmittal.com