Mysql_config_editor
How to add a new user mysql_config_editor set --login-path=prod --host=localhost --user=root --password
Different options you can provide host (No default value) login-path client user (No default value) socket (No default value) port (No default value)
Example with the port mysql_config_editor set --login-path=prod --host=localhost -- port= user=root --password
Reset existing password ~]# mysql_config_editor set --login-path=prod -- host=localhost --user=root --password Enter password: WARNING : 'prod' path already exists and will be overwritten. Continue? (Press y|Y for Yes, any other key for No) : y
WHEN YOU LOGIN USING MYSQL CLIENT mysql --login-path=prod
WHEN YOU USE MYSQLDUMP mysqldump --login-path=prod -d employees --single-transaction > dumpfile.out
HOW TO REMOVE ? mysql_config_editor remove --login-path=PROD