This article comes from my GitHub pages blog http://galengao.github.io/ie www.gaohuirong.cn
Mysql_config_editor allows you to store login authentication information in a file named. mylogin.cnf, where the file is located under Windows under the%appdata%\mysql directory, under Linux under the user's home directory. The file can be read at a later time through the MySQL client program to obtain the authentication credentials used to connect to the MySQL server.
Mysql_config_editor allows you to store login authentication information in a file named. mylogin.cnf, where the file is located under Windows under the%appdata%\mysql directory, under Linux under the user's home directory. The file can be read at a later time through the MySQL client program to obtain the authentication credentials used to connect to the MySQL server.
Also, the tool is available for at least mysql5.6.6 versions.
Create a Login-path:
Shell> Mysql_config_editor Set--login-path=test--user=root--password--host=localhostenter Password:
Once created, the. MYLOGIN.CNF will be saved in the user's home directory, where I use RHEL6, which is/home/op. The file is unreadable and resembles an option group that contains authentication information for a single identity.
When you log in to MySQL, you can specify the Login-path name you created, and then go directly to:
shell> mysql--login-path=test-loginID45.6. $-Log Source distribution ..... ... ..... ... .... ... ..... ..... .... ..... ..... ..... ..... ..... ..... ..............
But if someone can get the file, in some way, it can be cracked and get your password.
Login-path can only be created for user use (OS level).
If you want to see what's written in mylogin.cnf, you can use:
shell> mysql_config_editor Print–= = * *** == * * * * = LocalHost, of course, wants to read onlyone. Shell > mysql_config_editor print-login-path=== * * * * = localhost
To remove. MYLOGIN.CNF, you can use the
shell> mysql_config_editor Remove--login-path=test
Other options:
|
Format |
|
Description |
|
Introduced |
|
|
–all |
|
Print All login paths |
|
|
|
|
–debug[=debug_options] |
|
Write a debugging Log |
|
|
|
|
Help |
|
Display Help message and exit |
|
|
|
|
–host=host_name |
|
Host to write to login file |
|
|
|
|
–login-path=name |
|
Login path name |
|
|
|
|
–password |
|
Solicit password to write to login file |
|
|
|
|
–port=port_num |
|
TCP/IP port number to write to login file 5.6.11 |
|
|
|
|
–socket=path |
|
The Unix socket file name to write to login file 5.6.11 |
|
|
|
|
–user=user_name |
|
User name to write to login file |
|
|
|
|
–verbose |
|
Verbose mode |
|
|
|
|
–version |
|
Display Version information and exit |
|
|
|
|
–warn |
|
Warn and solicit confirmation for overwriting login path |
|
|
|
MySQL's Mysql_config_editor