Mysql 備份免密登入方法

2022-08-30 07:09:09 字數 884 閱讀 8488

前言:

1:執行mysql_config_editor命令,執行完成後,會在當前使用者目錄生成乙個.mylogin.cnf檔案

說明:--login-path:登入時呼叫的名稱

--user:免密登入的使用者

--host:免密登入的使用者主機

--password:免密登入的使用者密碼

[root@localhost ~]# mysql_config_editor set --login-path=test --user=root --host=localhost --password

2:通過指定生成的.mylogin.cnf檔案直接進入mysql

[root@localhost ~]# mysql --login-path=test

welcome to the mysql monitor. commands end with ; or \g.

your mysql connection

id is 20

server version:

5.6.45

mysql community server (gpl)

oracle is a registered trademark of oracle corporation and/or its

affiliates. other names may be trademarks of their respective

owners.

type

'help;

' or '\h'

for help. type '

\c' to clear

the current input statement.

mysql>

MySQL設定免密登入

在搭建mysql高可用的時候,出現如下問題 在用mysql日誌中提供的初始登入密碼登入失敗,現有免密登入,方法如下 1 在 etc my.cnf中修改 在 mysqld 最後新增 skip grant tables 2 重啟mysql 3 直接mysql進入 4 use mysql 5 修改賬號密碼...

Linux免密登入方法設定

在一次面試中,面試官問到 如何進行ssh免密登入設定?當時沒答上來,後來在csdn上看到最簡單的乙個辦法出自 首先感謝這位同學的分享。下面是我的實驗 即,2號主機要免密碼登入到1號主機。首先在2號主機上輸入命令 ssh keygen t rsa 輸入後一直按回車就完事了,下圖是實際的情況 上面的命令...

rsync之ssh方式備份 免密登入

ssh keygen t rsa ssh copy id i ssh id rsa.pub root ip 被登入伺服器ip ssh ip 被登入伺服器ip 不須要密碼直接可以訪問被登入伺服器了.rsync arhz delete root 192.168.9.240 opt opt delete ...