To specify an alternate login path file name, set the MYSQL_TEST_LOGIN_FILE  environment variable. This variable is recognized by mysql_config_editor , by standard MySQL clients ( mysql , mysqladmin , and so forth), and by the mysql-test-run.pl  testing utility. 

Programs use groups in the login path file as follows: 

• mysql_config_editor  operates on the client  login path by default if you specify no --login- path= name  option to indicate explicitly which login path to use. 

•Without a --login-path  option, client programs read the same option groups from the login path file that they read from other option files. Consider this command: 

mysql 

By default, the mysql  client reads the [client]  and [mysql]  groups from other option files, so it reads them from the login path file as well. 

•With a --login-path  option, client programs additionally read the named login path from the login path file. The option groups read from other option files remain the same. Consider this command: 

mysql --login-path=mypath 

The mysql  client reads [client]  and [mysql]  from other option files, and [client] , [mysql] , and [mypath]  from the login path file. 

•Client programs read the login path file even when the --no-defaults  option is used. This permits passwords to be specified in a safer way than on the command line even if --no-defaults  is present. 

mysql_config_editor  obfuscates the .mylogin.cnf  file so it cannot be read as cleartext, and its contents when unobfuscated by client programs are used only in memory. In this way, passwords can be stored in a file in non-cleartext format and used later without ever needing to be exposed on the command line or in an environment variable. mysql_config_editor  provides a print  command for displaying the login path file contents, but even in this case, password values are masked so as never to appear in a way that other users can see them. 

The obfuscation used by mysql_config_editor  prevents passwords from appearing in .mylogin.cnf as cleartext and provides a measure of security by preventing inadvertent password exposure. For example, if you display a regular unobfuscated my.cnf  option file on the screen, any passwords it contains are visible for anyone to see. With .mylogin.cnf , that is not true, but the obfuscation used is not likely to deter a determined attacker and you should not consider it unbreakable. A user who can gain system administration privileges on your machine to access your files could unobfuscate the .mylogin.cnf  file with some effort. 

The login path file must be readable and writable to the current user, and inaccessible to other users. Otherwise, mysql_config_editor  ignores it, and client programs do not use it, either. 

Invoke mysql_config_editor  like this: 

mysql_config_editor [ program_options ] command  [ command_options ] 

If the login path file does not exist, mysql_config_editor  creates it. 

Command arguments are given as follows: 

• program_options  consists of general mysql_config_editor  options. 

• command  indicates what action to perform on the .mylogin.cnf  login path file. For example, set writes a login path to the file, remove  removes a login path, and print  displays login path contents. 

