MySQL's Mysql_config_editor

Source: Internet
Author: User
Tags mysql client

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.