Check out example codes for "how to enable mysql 5.7 root user password on linux". It will help you in understanding the concepts better.

Code Example 1

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'SOME_NEW_ROOT_PASSWORD';

Learn ReactJs, React Native from akashmittal.com