===================== Create the Database ===================== Before we can actually setup and run our new app, it needs a database. This must be created via normal RDBMS tools; Wutta Framework does not (yet?) provide any tooling for this step. PostgreSQL is recommended although MariaDB/MySQL is also supported. PostgreSQL ---------- Install APT packages if needed: .. code-block:: sh sudo apt install postgresql libpq-dev Install Python packages (to virtual environment) if needed: .. code-block:: sh pip install psycopg Make a new DB user (``myuser``) if needed: .. code-block:: sh sudo -u postgres createuser myuser And if so, also set the password: .. code-block:: sh sudo -u postgres psql -c "ALTER USER myuser PASSWORD 'mypassword'" And finally create the DB (``poserdb`` owned by ``myuser``): .. code-block:: sh sudo -u postgres createdb -O myuser poserdb MariaDB/MySQL ------------- Install APT packages if needed: .. code-block:: sh sudo apt install default-mysql-server Install Python packages (to virtual environment) if needed: .. code-block:: sh pip install mysql-connector-python Make a new DB user (``myuser``) if needed: .. code-block:: sh sudo mysql -e "CREATE USER myuser@localhost" And if so, also set the password: .. code-block:: sh sudo mysql -e "ALTER USER myuser@localhost IDENTIFIED BY 'mypassword'" Create the DB (``poserdb``): .. code-block:: sh sudo mysqladmin create poserdb And grant all perms (to ``myuser`` for ``poserdb``): .. code-block:: sh sudo mysql -e "GRANT ALL ON poserdb.* TO myuser@localhost"