mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-10 17:34:41 +00:00
MySQL/MariaDB: fix create user with password (#4918)
* MySQL/MariaDB: Fix Authentification with password * add apache guac * harmonize $STD value
This commit is contained in:
parent
824fd22aae
commit
b4a58b907f
19 changed files with 37 additions and 37 deletions
|
@ -28,9 +28,9 @@ msg_info "Setting up Database"
|
|||
DB_NAME=bookstack
|
||||
DB_USER=bookstack
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
$STD sudo mariadb -u root -e "CREATE DATABASE $DB_NAME;"
|
||||
$STD sudo mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');"
|
||||
$STD sudo mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
$STD mariadb -u root -e "CREATE DATABASE $DB_NAME;"
|
||||
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
||||
$STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
{
|
||||
echo "Bookstack-Credentials"
|
||||
echo "Bookstack Database User: $DB_USER"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue