当前位置:Gxlcms > 数据库问题 > mysql_config_editor

mysql_config_editor

时间:2021-07-01 10:21:17 帮助过:2人阅读

root@server-mysql bin]# ./mysql_config_editor set --login-path=client --user=root --password --socket=/tmp/mysql.sock5 Enter password: [root@server-mysql bin]# ./mysql_config_editor set --login-path=client1 --user=root --host=127.0.0.1 --password --port=3310 Enter password:

 

打印所有已经写入的账号

[root@server-mysql 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


 

登陆:

[root@server-mysql bin]# ./mysql --login-path=client

 

 

账号写入位置:该文件已经加密, 不能被偷看

[root@server-mysql ~]# find / |grep  .mylogin.cnf 
/root/.mylogin.cnf

 

mysql_config_editor

标签:

人气教程排行