diff --git a/conf/lamp b/conf/lamp index a8247275..979143e8 100644 --- a/conf/lamp +++ b/conf/lamp @@ -467,19 +467,19 @@ del_vhost() { } make_temp_mycnf() { - cat >~/.my.cnf</root/.my.cnf</tmp/.mysql.tmp chmod 600 /tmp/.mysql.tmp - /usr/bin/mariadb --defaults-file=~/.my.cnf /dev/null 2>&1; then + if /usr/bin/mariadb --defaults-file="/root/.my.cnf" /dev/null 2>&1; then _info "Add database $(_green "${database_name}") sucessfully." else _info "Add database $(_red "${database_name}") failed." @@ -545,7 +545,7 @@ EOF } list_database() { - if /usr/bin/mariadb --defaults-file=~/.my.cnf -e "SHOW DATABASES;"; then + if /usr/bin/mariadb --defaults-file="/root/.my.cnf" -e "SHOW DATABASES;"; then _info "List all databases sucessfully." else _info "List all databases failed." @@ -567,7 +567,7 @@ DROP USER '${database_name}'@'localhost'; DROP DATABASE \`${database_name}\`; FLUSH PRIVILEGES; EOF - if /usr/bin/mariadb --defaults-file=~/.my.cnf