加入账号:
[[email protected] bin]# ./mysql_config_editor set --login-path=client --user=root --password --socket=/tmp/mysql.sock5 Enter password: [[email protected] bin]# ./mysql_config_editor set --login-path=client1 --user=root --host=127.0.0.1 --password --port=3310 Enter password:
打印所有已经写入的账号
[[email protected] bin]# ./mysql_config_editor print --all [client] user = root password = ***** socket = /tmp/mysql.sock5 [client1] user = root password = ***** host = 127.0.0.1 port = 3310
登陆:
[[email protected] bin]# ./mysql --login-path=client
账号写入位置:该文件已经加密, 不能被偷看
[[email protected] ~]# find / |grep .mylogin.cnf /root/.mylogin.cnf
时间: 2024-10-14 01:23:48