MySQL store login info

user-pic
Vote 0 Votes

mysql_config_editor 可以將 MySQL 登入資訊存入, 實際上是編碼後的資料存在 ~/.mylogin.cnf
可以避免密碼出現在 script 內

設定
mysql_config_editor set --login-path=dbname -u user -p -h host

使用
mysql --login-path=dbname

列出現有資訊
mysql_config_editor print --all

About this Entry

This page contains a single entry by Pank published on March 31, 2020 11:45 AM.

CentOS 7/8 set locale was the previous entry in this blog.

Dalgona coffee is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Monthly Archives