Action disabled: diff
kb:intranet:platforms:qnap:database
Database
Changelog
- 2023-05-02: Old writeup...
Demo of conflicts…?
Some quick notes for MariaDB on the QNAP. Meant to be direct port of MySQL (but both are open-source…?)
Dump of everything I was working on today and yesterday. Still trying to figure out how to do RESTful APIs.
Setting up
- Search for the binary using
find / -name mysql
- QNAP has aliases for the same directory:
/usr/local/mysql
and/usr/local/mariadb
- Connect to the database using
/usr/local/mariadb/bin/mysql -u root -p
Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 493 Server version: 5.5.57-MariaDB MariaDB Server Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> USE test; Database changed MariaDB [test]> SELECT * from test_table; +----+--------+------------+---------+ | id | name | date | workout | +----+--------+------------+---------+ | 1 | justin | 0000-00-00 | 1 | | 2 | justin | 0000-00-00 | 1 | +----+--------+------------+---------+ 2 rows in set (0.00 sec)
MariaDB
- root/admin default password
- QNAP-specific: https://forum.qnap.com/viewtopic.php?t=138714
- phpMyAdmin gives direct access to database: https://pyuxiang.com/phpMyAdmin
- Good tutorial and background on databases: https://mariadb.com/kb/en/database-design-phase-2-conceptual-design/
- Essentially data structure choice for indices: https://www.sqlshack.com/what-is-the-difference-between-clustered-and-non-clustered-indexes-in-sql-server/
SQL server
- Standard practice to use SSH or VPN as gateway
Sending and processing POST requests
mod_python
is inactive, whilemod_wsgi
is currently uncompilable on the QNAP. Need to look for alternative scripting languages.- PHP seems appropriate: insert into SQL
LAMP looks like the minimalist way to go.
Graph plotting
- Can’t seem to build matplotlib in the QNAP, resorting to GNUplot for server-side plotting of the gym graphs.
another test
kb/intranet/platforms/qnap/database.txt · Last modified: 6 days ago (17 August 2025) by Justin