Check out example codes for "how to enable mysql authentication on ubuntu 18.04". It will help you in understanding the concepts better.

Code Example 1

[mysqld]

Code Example 2

//follow this blog

https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-18-04

Learn ReactJs, React Native from akashmittal.com