MySQL :Passwordless authentication using MySQL Config Editor

Опубликовано: 06 Октябрь 2024
на канале: E-MultiSkills Database services
1,191
14

MySQL : Passwordless authentication using mysql_config_editor


-- login path is a way in which you can keep the password for user in a encrypted file and using login path you can login.






%APPDATA%\MYSQL
Location :C:\Users\ajha36\AppData\Roaming\MySQL mylogin.cnf


Steps to Configure :-
********************


mysql_config_editor print --all


mysql_config_editor set --login-path=emultiskills_MYSQL_root --host=localhost --user=root --password


-- It prompts for the password. 


-- the user/pass are saved encrypted in your /home/mysql/.mylogin.cnf


Testing :-
=======


How to login using login path.
*******************************


mysql --login-path=emultiskills_MYSQL_root




Print all login-paths / Profiles:
**********************************
mysql_config_editor print --all




Removing a login-path/Profile
*****************************


To remove a profile we can simple issue following command [Replace emultiskills_MYSQL_root with your login-path/profile name ]:


mysql_config_editor remove --login-path=emultiskills_MYSQL_root