diff --git a/handbook/troggle/serverconfig.html b/handbook/troggle/serverconfig.html index e73f0e047..aea9689a3 100644 --- a/handbook/troggle/serverconfig.html +++ b/handbook/troggle/serverconfig.html @@ -65,7 +65,7 @@ See the live report on which urls resolve to which actual folders at xapian (search function) - xapian.org. Wookey did this in 2020.
The public server uses a MariaDB SQL database and development is usually done using a single-user sqlite database which is a standard Django option.
-You will find it very, very useful to see what is going on if you look directly at the data in the database (just a single file in the sqlite case) and browse the data in the tables. This is vital when doing Django migrations between Django versions. A light-weight, simple db browser is DB Browser for SQLite. Connecting directly the the MariaDB database with a control panel or workbench gives even more tools and documentation capabilities. See the troggle server documentation for how to install MariaDB. +You will find it very, very useful to see what is going on if you look directly at the data in the database (just a single file in the sqlite case) +and browse the data in the tables. This is vital when doing Django migrations between Django versions. A light-weight, simple db browser is DB Browser for SQLite. Connecting directly the the MariaDB database with a control panel or workbench gives even more tools and documentation capabilities. See the +troggle server documentation for how to install MariaDB. +
When Ubuntu is running on WSL, it does not use systemctl. So you need specific instructions for installing MariaDB under WSL, +see +
Create a new dedicated administrative MariaDB user 'expo' who can access all databases. Log in to the MariaDB command with +
sudo mysql ++and execute these commands: +
+GRANT ALL PRIVILEGES on *.* TO 'expo'@'%' IDENTIFIED BY 'my-secret-password-schwatzmooskogel' WITH GRANT OPTION;
+SET PASSWORD FOR expo=PASSWORD('my-secret-password-schwatzmooskogel');
+FLUSH PRIVILEGES;
+QUIT;
+
+and you will need to set this user and password in your localsettings.py:
+
+DATABASE = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.mysql', # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
+ 'NAME' : 'troggle', # Or path to database file if using sqlite3.
+ 'USER' : 'expo',
+ 'PASSWORD' : 'my-secret-password-schwatzmooskogel',
+ 'HOST' : '', # Set to empty string for localhost. Not used with sqlite3.
+ 'PORT' : '', # Set to empty string for default. Not used with sqlite3.
+ }
+}
+
+That is because we need to install the python tools that talk to mariadb. +
+pip install mariadb ++but note that there is a problem with using python 3.10 in that some bits of pip are not correct and you will get a +ImportError: cannot import name 'html5lib' error. +[Currently under investigation, June 2022]