Changes

From SME Server
Jump to navigationJump to search
193 bytes added ,  22:46, 17 May 2022
Line 202: Line 202:     
Here a simple procedure, after having the new db working as a sclo [[Mariadb105]] for SME10 as example.<syntaxhighlight lang="bash">
 
Here a simple procedure, after having the new db working as a sclo [[Mariadb105]] for SME10 as example.<syntaxhighlight lang="bash">
occ maintenance --on
+
occ maintenance:mode --on
 
mysqldump `config getprop nextcloud DbName` > nextcloud.sql
 
mysqldump `config getprop nextcloud DbName` > nextcloud.sql
mysql105 < nextcloud.sql
+
echo "CREATE DATABASE IF NOT EXISTS `config getprop nextcloud DbName` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"| mysql105
echo "CREATE USER IF NOT EXISTS `config getprop nextcloud DbUser`@localhost IDENTIFIED BY '`config getprop nextcloud DbPassword`';GRANT ALL PRIVILEGES ON `config getprop nextcloud DbName`.* TO`config getprop nextcloud DbUser`@localhost; FLUSH PRIVILEGES;" | mysql105
+
mysql105 `config getprop nextcloud DbName`< nextcloud.sql
 +
echo "CREATE USER IF NOT EXISTS `config getprop nextcloud DbUser`@localhost IDENTIFIED BY '`config getprop nextcloud DbPassword`';"| mysql105
 +
echo "GRANT ALL PRIVILEGES ON `config getprop nextcloud DbName`.* TO `config getprop nextcloud DbUser`@localhost; FLUSH PRIVILEGES;" | mysql105
 
occ config:system:set host --value localhost:/var/lib/mysql/mariadb105.sock --type string
 
occ config:system:set host --value localhost:/var/lib/mysql/mariadb105.sock --type string
occ maintenance --off
+
occ maintenance:mode --off
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Super Admin, Wiki & Docs Team, Bureaucrats, Interface administrators, Administrators
3,254

edits

Navigation menu