Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to protect mysql_config_editor/login-path login password

Shulou Source: shulou.com Published: 2022-06-01 03:01:14 10月01日 Update

How to carry out mysql_config_editor/login-path login password protection, I believe that many inexperienced people do not know what to do, so this paper summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.

Login-path is a new feature that MySQL5.6 begins to support. Encrypt the authentication information logged into the mysql_config_editor service in the .mylogin.cnf file (default in the user's home directory). After that, the MySQL client tool can connect to MySQL by reading the encrypted file, avoiding repeated entry of login information and exposure of sensitive information.

Help for using mysql_config_editor:

Configuration:

Mysql_config_editor set-host=127.0.0.1-login-path=local3306-port=3306-user=root-p

Where configurable items

Add host to the login file

-the login path name adds a name to the login file (default is client)

Add the password to the login file (the password will be automatically encrypted by mysql_config_editor)

Add the user name to the login file

Add sock file path to login file

Add the login port to the login file

Display configuration:

Mysql_config_editor print-- login-path=local3306 # shows the login-path configuration performed

Mysql_config_editor print-- all # displays all login-path information

Delete the configuration:

Mysql_config_editor remove-login-path=local3306

Where items can be deleted

Add host to the login file

-the login path name adds a name to the login file (default is client)

Add the password to the login file (the password will be automatically encrypted by mysql_config_editor)

Add the user name to the login file

Add sock file path to login file

Add the login port to the login file

Reset the configuration:

Mysql_config_editor reset-login-path=local3306

Log in using login-path:

Shell > mysql-- login-path=local3306

To log in to other hosts or ports, or to add other additional parameters, you can add them directly after the above command

Shell > mysql-- login-path=local3306-h host1-P port1 # Log in to MySQL on host1:poet1

Shell > mysql-- login-path=local3306-h host1-P port1 local3306_db # Log in to the local3306_ DB library in MySQL on host1:poet1

[root@12c01 ~] # mysql-- login-path=local3306 test # # directly enter the test library of the configuration environment

Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.

01:52 test >

After reading the above, have you mastered how to protect the password of mysql_config_editor/login-path login? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Tags: File login login configuration password information encryption port password protection protection content name tool method more user name path problem helpless Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Linux Xiaomi MySQL vpn