Open CrazyHenk44 opened 3 years ago
What version of MySQL are you using? In my (limited) testing with 10.6.4-MariaDB using text on UNIQUE fields seem to work fine. I am open to using a more-compatible alternative though, if it is really necessary for a recent version of MySQL. Does varchar(64) work correctly in your setup?
For the service file: Do you refer to the one created by the installation script? (https://github.com/robske110/IDDataLogger/blob/master/docs/install.sh#L30-L46) That script is really only intended for PostgreSQL installation, which is also the recommended database for IDDataLogger. I will not provide any scripts for mysql installation, since using mysql with IDDataLogger, although not deprecated, is definitely discouraged. I simply don't have the time to do regular testing with MySQL nor am I familiar with MySQL.
varchar 64 should work fine yes. I can probably try on a fresh database if you update the code.
Maybe just make a remark "(change pgsql to mysql if needed)". I would expect the service file to be able to depend on or the other in the same file, but I would not know how.
Ok thanks and can you check what your MySQL server version is?
ii mariadb-client-10.3 1:10.3.29-0+deb10u1 amd64 MariaDB database client binaries ii mariadb-client-core-10.3 1:10.3.29-0+deb10u1 amd64 MariaDB database core client binaries ii mariadb-common 1:10.3.29-0+deb10u1 all MariaDB common metapackage ii mariadb-server 1:10.3.29-0+deb10u1 all MariaDB database server (metapackage depending on the latest version) ii mariadb-server-10.3 1:10.3.29-0+deb10u1 amd64 MariaDB database server binaries ii mariadb-server-core-10.3 1:10.3.29-0+deb10u1 amd64 MariaDB database core server files
Hi,
You can't make a text field Unique (= key) without giving the key length. (authKey)
12:18:32.443773 [CRITICAL] PDOException: "SQLSTATE[42000]: Syntax error or access violation: 1170 BLOB/TEXT column 'authKey' used in key specification without a key length" (42000) in "[snip]Main.php" at line 82
And the service file could possible not only sheck for postgress but alternatively for mysql.