more on mariadb

This commit is contained in:
Philip Sargent 2022-06-25 16:19:07 +03:00
parent e350ebc776
commit 9398ba0bf0

View File

@ -415,7 +415,7 @@ and browse the data in the tables. This is vital when doing Django migrations be
"https://www.mysql.com/products/workbench/">workbench</a> gives even more tools and documentation capabilities. See the <a href="serverconfig.html">
troggle server documentation</a> for how to install MariaDB.
<p>When Ubuntu is running on WSL, it does not use systemctl. So you need specific instructions for installing MariaDB under WSL,
see
do what it says in these instructions first (sudo apt install ...etc.):
<ul>
<li><a href="https://segmentfault.com/a/1190000040671057/en">Ubuntu-20.04 (WSL) install MySQL (MariaDB)</a>.
<li><a href="https://stackoverflow.com/questions/52487644/install-mariadb-in-windows-subsystem-linux-wsl">
@ -436,23 +436,30 @@ and you will need to set this user and password in your <var>localsettings.py</v
DATABASE = {
'default': {
'ENGINE': 'django.db.backends.mysql', # 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME' : 'troggle', # Or path to database file if using sqlite3.
'NAME' : 'troggle',
'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.
'HOST' : '', # Set to empty string for localhost.
'PORT' : '', # Set to empty string for default.
}
}
</pre>
<h4>But it still does not work</h4>
<p>That is because we need to install the python tools that talk to 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
<var>ImportError: cannot import name 'html5lib'</var> error.
[Currently under investigation, June 2022] TEMPORARILY use this hack from bootstrap:
<pre>
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
pip install mysql-connector-python
</pre>
installs the correct pip for python3.10 on Ubuntu. Which works, then
<pre>
pip install mariadb
</pre>
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
<var>ImportError: cannot import name 'html5lib'</var> error.
[Currently under investigation, June 2022]
which still fails. Hmph.
<hr />
Go on to: <a href="trogarch.html">Troggle architecture</a><br />