Add support vor unix socket located at /run/mysqld folder.

This commit is contained in:
Christoph 2023-08-02 16:06:15 +02:00
parent 270def192f
commit cd815ee66f
7 changed files with 14 additions and 0 deletions

View File

@ -508,6 +508,8 @@ else
|| ( [[ $MAJOR_VERSION -eq 10 ]] && [[ $MINOR_VERSION -gt 3 ]] )) ; then || ( [[ $MAJOR_VERSION -eq 10 ]] && [[ $MINOR_VERSION -gt 3 ]] )) ; then
if [[ -S "/tmp/mysql.sock" ]]; then if [[ -S "/tmp/mysql.sock" ]]; then
MYSQL_CREDENTIAL_ARGS="-u root -S /tmp/mysql.sock" MYSQL_CREDENTIAL_ARGS="-u root -S /tmp/mysql.sock"
elif [[ -S "/run/mysqld/mysqld.sock" ]]; then
MYSQL_CREDENTIAL_ARGS="-u root -S /run/mysqld/mysqld.sock"
elif [[ -S "/var/run/mysqld/mysqld.sock" ]]; then elif [[ -S "/var/run/mysqld/mysqld.sock" ]]; then
MYSQL_CREDENTIAL_ARGS="-u root -S /var/run/mysqld/mysqld.sock" MYSQL_CREDENTIAL_ARGS="-u root -S /var/run/mysqld/mysqld.sock"
else else

View File

@ -470,6 +470,8 @@ else
|| ( [[ $MAJOR_VERSION -eq 10 ]] && [[ $MINOR_VERSION -gt 3 ]] )) ; then || ( [[ $MAJOR_VERSION -eq 10 ]] && [[ $MINOR_VERSION -gt 3 ]] )) ; then
if [[ -S "/tmp/mysql.sock" ]]; then if [[ -S "/tmp/mysql.sock" ]]; then
MYSQL_CREDENTIAL_ARGS="-u root -S /tmp/mysql.sock" MYSQL_CREDENTIAL_ARGS="-u root -S /tmp/mysql.sock"
elif [[ -S "/run/mysqld/mysqld.sock" ]]; then
MYSQL_CREDENTIAL_ARGS="-u root -S /run/mysqld/mysqld.sock"
elif [[ -S "/var/run/mysqld/mysqld.sock" ]]; then elif [[ -S "/var/run/mysqld/mysqld.sock" ]]; then
MYSQL_CREDENTIAL_ARGS="-u root -S /var/run/mysqld/mysqld.sock" MYSQL_CREDENTIAL_ARGS="-u root -S /var/run/mysqld/mysqld.sock"
else else

View File

@ -399,6 +399,8 @@ else
|| ( [[ $MAJOR_VERSION -eq 10 ]] && [[ $MINOR_VERSION -gt 3 ]] )) ; then || ( [[ $MAJOR_VERSION -eq 10 ]] && [[ $MINOR_VERSION -gt 3 ]] )) ; then
if [[ -S "/tmp/mysql.sock" ]]; then if [[ -S "/tmp/mysql.sock" ]]; then
MYSQL_CREDENTIAL_ARGS="-u root -S /tmp/mysql.sock" MYSQL_CREDENTIAL_ARGS="-u root -S /tmp/mysql.sock"
elif [[ -S "/run/mysqld/mysqld.sock" ]]; then
MYSQL_CREDENTIAL_ARGS="-u root -S /run/mysqld/mysqld.sock"
elif [[ -S "/var/run/mysqld/mysqld.sock" ]]; then elif [[ -S "/var/run/mysqld/mysqld.sock" ]]; then
MYSQL_CREDENTIAL_ARGS="-u root -S /var/run/mysqld/mysqld.sock" MYSQL_CREDENTIAL_ARGS="-u root -S /var/run/mysqld/mysqld.sock"
else else

View File

@ -483,6 +483,8 @@ else
|| ( [[ $MAJOR_VERSION -eq 10 ]] && [[ $MINOR_VERSION -gt 3 ]] )) ; then || ( [[ $MAJOR_VERSION -eq 10 ]] && [[ $MINOR_VERSION -gt 3 ]] )) ; then
if [[ -S "/tmp/mysql.sock" ]]; then if [[ -S "/tmp/mysql.sock" ]]; then
MYSQL_CREDENTIAL_ARGS="-u root -S /tmp/mysql.sock" MYSQL_CREDENTIAL_ARGS="-u root -S /tmp/mysql.sock"
elif [[ -S "/run/mysqld/mysqld.sock" ]]; then
mysql_credential_args="-u root -S /run/mysqld/mysqld.sock"
elif [[ -S "/var/run/mysqld/mysqld.sock" ]]; then elif [[ -S "/var/run/mysqld/mysqld.sock" ]]; then
MYSQL_CREDENTIAL_ARGS="-u root -S /var/run/mysqld/mysqld.sock" MYSQL_CREDENTIAL_ARGS="-u root -S /var/run/mysqld/mysqld.sock"
else else

View File

@ -556,6 +556,8 @@ else
|| ( [[ $MAJOR_VERSION -eq 10 ]] && [[ $MINOR_VERSION -gt 3 ]] )) ; then || ( [[ $MAJOR_VERSION -eq 10 ]] && [[ $MINOR_VERSION -gt 3 ]] )) ; then
if [[ -S "/tmp/mysql.sock" ]]; then if [[ -S "/tmp/mysql.sock" ]]; then
MYSQL_CREDENTIAL_ARGS="-u root -S /tmp/mysql.sock" MYSQL_CREDENTIAL_ARGS="-u root -S /tmp/mysql.sock"
elif [[ -S "/run/mysqld/mysqld.sock" ]]; then
mysql_credential_args="-u root -S /run/mysqld/mysqld.sock"
elif [[ -S "/var/run/mysqld/mysqld.sock" ]]; then elif [[ -S "/var/run/mysqld/mysqld.sock" ]]; then
MYSQL_CREDENTIAL_ARGS="-u root -S /var/run/mysqld/mysqld.sock" MYSQL_CREDENTIAL_ARGS="-u root -S /var/run/mysqld/mysqld.sock"
else else

View File

@ -477,6 +477,8 @@ else
|| ( [[ $MAJOR_VERSION -eq 10 ]] && [[ $MINOR_VERSION -gt 3 ]] )) ; then || ( [[ $MAJOR_VERSION -eq 10 ]] && [[ $MINOR_VERSION -gt 3 ]] )) ; then
if [[ -S "/tmp/mysql.sock" ]]; then if [[ -S "/tmp/mysql.sock" ]]; then
MYSQL_CREDENTIAL_ARGS="-u root -S /tmp/mysql.sock" MYSQL_CREDENTIAL_ARGS="-u root -S /tmp/mysql.sock"
elif [[ -S "/run/mysqld/mysqld.sock" ]]; then
mysql_credential_args="-u root -S /run/mysqld/mysqld.sock"
elif [[ -S "/var/run/mysqld/mysqld.sock" ]]; then elif [[ -S "/var/run/mysqld/mysqld.sock" ]]; then
MYSQL_CREDENTIAL_ARGS="-u root -S /var/run/mysqld/mysqld.sock" MYSQL_CREDENTIAL_ARGS="-u root -S /var/run/mysqld/mysqld.sock"
else else

View File

@ -377,6 +377,8 @@ else
|| ( [[ $MAJOR_VERSION -eq 10 ]] && [[ $MINOR_VERSION -gt 3 ]] )) ; then || ( [[ $MAJOR_VERSION -eq 10 ]] && [[ $MINOR_VERSION -gt 3 ]] )) ; then
if [[ -S "/tmp/mysql.sock" ]]; then if [[ -S "/tmp/mysql.sock" ]]; then
MYSQL_CREDENTIAL_ARGS="-u root -S /tmp/mysql.sock" MYSQL_CREDENTIAL_ARGS="-u root -S /tmp/mysql.sock"
elif [[ -S "/run/mysqld/mysqld.sock" ]]; then
mysql_credential_args="-u root -S /run/mysqld/mysqld.sock"
elif [[ -S "/var/run/mysqld/mysqld.sock" ]]; then elif [[ -S "/var/run/mysqld/mysqld.sock" ]]; then
MYSQL_CREDENTIAL_ARGS="-u root -S /var/run/mysqld/mysqld.sock" MYSQL_CREDENTIAL_ARGS="-u root -S /var/run/mysqld/mysqld.sock"
else else