如下:
mysql_config_editor set --login-path=test --user=root --password -S /var/lib/mysql/mysql.sock --port=3306
[root@mysql ~]# more .mylogin.cnf -------加密过后的文件是二进制文件不能够直接读出
#l..HAR}孟: .E??>?X? ~.&..U合0
[root@mysql ~]# mysql_config_editor print --all
[client]
user = root
password = *****------密码隐式显示
socket = /var/lib/mysql/mysql.sock
port = 3306
[test]
user = root
password = *****
socket = /var/lib/mysql/mysql.sock
port = 3306
[root@mysql ~]#
mysql_config_editor set --login-path=test --user=root --password -S /var/lib/mysql/mysql.sock --port=3306
[root@mysql ~]# more .mylogin.cnf -------加密过后的文件是二进制文件不能够直接读出
#l..HAR}孟: .E??>?X? ~.&..U合0
[root@mysql ~]# mysql_config_editor print --all
[client]
user = root
password = *****------密码隐式显示
socket = /var/lib/mysql/mysql.sock
port = 3306
[test]
user = root
password = *****
socket = /var/lib/mysql/mysql.sock
port = 3306
[root@mysql ~]#
![](http://img.blog.itpub.net/blog/attachment/201503/31/26764973_1427815940p33Z.jpg?x-oss-process=style/bb)
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26764973/viewspace-1480867/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/26764973/viewspace-1480867/