预设mysql密码,减少输入密码过程,免密登录,同时避免[Warning] Using a password on the command line interface can be insecure.的提示
流程
-
设置登录凭证
mysql_config_editor set --login-path=dump --user=root -p# dump是个名称,可为其他 -
查看已有的登录凭证
mysql_config_editor print --all -
使用登录凭证
mysql --login-path=dumpmysql可以是其他命令 -
删除登录凭证
mysql_config_editor remove --login-path=dump

浙公网安备 33010602011771号