/etc/pam.d/mysql中改為以下幾行(如果要以作業系統的帳號登入):
@include common-auth @include common-account @include common-session-noninteractive
另外在登入mysql時在指令中加上 ---enable-cleartext-plugin 參數或設環境變數
LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN=1