Its useful when you need some MySQL information like database, table names for you bash, python scripts.
mysql -u root -p
CREATE USER user_name;
SET PASSWORD FOR user_name = PASSWORD (‘password’);
Grant the user access to read data from the needed tables. Type the following command:
GRANT SELECT ON database_name.table_name TO user_name;