Changes

From SME Server
Jump to navigationJump to search
Line 110: Line 110:  
== Mariadb myslq init ==
 
== Mariadb myslq init ==
   −
=== default user, password and db for your app ===
+
=== generate default user, password and db for your app ===
 
create the following file to generate the default password dbname and dbuser
 
create the following file to generate the default password dbname and dbuser
   Line 132: Line 132:  
</syntaxhighlight>
 
</syntaxhighlight>
    +
=== create and populate your db ===
 +
Then, create a file in smeserver-mycontrib-1.0/root/etc/e-smith/templates/etc/e-smith/sql/init/80mycontrib.
   −
Then, create a file in smeserver-mycontrib-1.0/root/etc/e-smith/templates/etc/e-smith/sql/init/80mycontrib<syntaxhighlight lang="perl">
+
This content will generate a new user and db into your mariadb server, when expanding the template and restarting service mysql.init <syntaxhighlight lang="perl">
 
{
 
{
 
   my $db = $mycontrib{DbName} || 'mycontrib';
 
   my $db = $mycontrib{DbName} || 'mycontrib';
Line 156: Line 158:  
}
 
}
   −
</syntaxhighlight>
+
</syntaxhighlight>You can also add some line in there to populate the content of the database using a mysql dump. Pay attention to make it not to overwrite existing data ;)
    
== Systemd ==
 
== Systemd ==
Super Admin, Wiki & Docs Team, Bureaucrats, Interface administrators, Administrators
3,254

edits

Navigation menu