MySQL 8.4 發行說明
perror 顯示 MySQL 或作業系統錯誤碼的錯誤訊息。像這樣叫用 perror
perror [options] errorcode ...
perror 嘗試以彈性的方式理解其引數。例如,對於 ER_WRONG_VALUE_FOR_VAR
錯誤,perror 可以理解下列任何引數:1231
、001231
、MY-1231
或 MY-001231
,或 ER_WRONG_VALUE_FOR_VAR
。
$> perror 1231
MySQL error code MY-001231 (ER_WRONG_VALUE_FOR_VAR): Variable '%-.64s'
can't be set to the value of '%-.200s'
如果錯誤數字位於 MySQL 和作業系統錯誤重疊的範圍內,perror 會顯示這兩種錯誤訊息
$> perror 1 13
OS error code 1: Operation not permitted
MySQL error code MY-000001: Can't create/write to file '%s' (OS errno %d - %s)
OS error code 13: Permission denied
MySQL error code MY-000013: Can't get stat of '%s' (OS errno %d - %s)
若要取得 MySQL Cluster 錯誤碼的錯誤訊息,請使用 ndb_perror 公用程式。
系統錯誤訊息的意義可能取決於您的作業系統。給定的錯誤碼在不同的作業系統上可能表示不同的含義。
perror 支援下列選項。