Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Mysql_config_editor secure login tool learning

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Mysql_config_editor appears in later versions of mysql5.6.6 and can generate an encrypted file .mylogin.cnf for specified connections and passwords, which is located in the current user's home directory by default. Through this file, you can log in directly using mysql, mysqladmin, etc., to avoid plaintext passwords appearing in the script.

Notice: to use this feature, the mysql version of the current host is required to be 5.6.6 or above, and there is no requirement for the mysql server version that will be logged in.

Usage:

Generate encrypted files:

[root@~] # mysql_config_editor set-login-path=dba-user=dba-password

Enter password:

View the password file:

[root@~] # ll ~ / .mylogin.cnf

-rw- 1 root root 80 November 24 10:34 / root/.mylogin.cnf

View the specific encryption configuration:

[root@~] # mysql_config_editor print-- all

[dba]

User = dba

Password = *

Log in using encrypted files:

Give an example

[root@~] # mysql-login-path= dba-host=10.0.0.1-port=3306

Delete an encrypted login:

[root@~] # mysql_config_editor remove-- login-path=dba

Reset all:

[root@~] # mysql_config_editor reset

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report