Added explicit encoding indication when importing (#21)

This commit is contained in:
Sergei Solovev 2024-11-27 02:18:29 +03:00 committed by GitHub
parent 54b559c5bd
commit 7031217c56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -247,8 +247,8 @@ EOF
# Applying privilege changes
sudo mysql -e "FLUSH PRIVILEGES;" 2>&1 | sudo tee -a "$logsInst" > /dev/null
# Exporting a database
{ sudo cat /var/www/torrentpier/install/sql/mysql.sql | sudo mysql -u "$userSql" -p"$passSql" "$dbSql"; } 2>&1 | sudo tee -a "$logsInst" > /dev/null
# Import a database
{ sudo cat /var/www/torrentpier/install/sql/mysql.sql | sudo mysql --default-character-set=utf8mb4 -u "$userSql" -p"$passSql" "$dbSql"; } 2>&1 | sudo tee -a "$logsInst" > /dev/null
# We set the rights to directories and files
sudo chown -R www-data:www-data /var/www/torrentpier 2>&1 | sudo tee -a "$logsInst" > /dev/null