Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySql scheme incorrect. #24

Open
CrazyHenk44 opened this issue Aug 30, 2021 · 4 comments
Open

MySql scheme incorrect. #24

CrazyHenk44 opened this issue Aug 30, 2021 · 4 comments
Labels
alt-db Issues related to non postgresql Databases.

Comments

@CrazyHenk44
Copy link

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.

@robske110 robske110 added the alt-db Issues related to non postgresql Databases. label Aug 31, 2021
@robske110
Copy link
Owner

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.

@CrazyHenk44
Copy link
Author

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.

@robske110
Copy link
Owner

Ok thanks and can you check what your MySQL server version is?

@CrazyHenk44
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alt-db Issues related to non postgresql Databases.
Projects
None yet
Development

No branches or pull requests

2 participants