1. Create with Mysql_config_editor tool. mylogin.cnf
# Mysql_config_editor Set--login-path=client--host=localhost--user=www--password
Enter password after carriage return
2, at this time in the/root/directory to generate a hidden file, viewing is garbled
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/89/DB/wKioL1ggEnjyrlodAAAwDAzN-fY657.png-wh_500x0-wm_3 -wmp_4-s_702445548.png "title=" Qq20161107133433.png "alt=" Wkiol1ggenjyrlodaaawdazn-fy657.png-wh_50 "/>
3, then you can use the MySQL--login-path=client landed
# MySQL--login-path=client
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/89/DB/wKioL1ggE2CR4QNtAAB23vrVLJg145.png-wh_500x0-wm_3 -wmp_4-s_98665532.png "title=" Qq20161107133818.png "alt=" Wkiol1gge2cr4qntaab23vrvljg145.png-wh_50 "/>
4, add the system alias inside
# VIM/ROOT/.BASHRC
Alias mysql= ' MySQL--login-path=client '
# . /root/.bashrc
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/89/DB/wKioL1ggFE3y8Ne8AAB-OG0Vsk4222.png-wh_500x0-wm_3 -wmp_4-s_2974582036.png "title=" Qq20161107134220.png "alt=" Wkiol1ggfe3y8ne8aab-og0vsk4222.png-wh_50 "/>
Note: To re-execute the mysql_config_editor after the password has been modified.
Log in to MySQL 5.6.32 without entering the password every time mysql_config_editor