grishka / Smithereen

Federated, ActivityPub-compatible social network server with friends, walls, and groups.
The Unlicense
393 stars 31 forks source link

Emphasise supported MySQL version in README.md #7

Closed handlerug closed 3 years ago

handlerug commented 4 years ago

Because dump (and Sequel Pro itself) are not compatible with newer versions of MySQL, and people may not know that.

shadowlmd commented 3 years ago

I am running Smithereen with MySQL 8.0.26.

You only need two things:

  1. Create user with mysql_native_password auth plugin, i.e.:
    CREATE USER 'smithereen'@'%' IDENTIFIED WITH mysql_native_password BY 'some_password';
  2. Modify scheme line 526 to remove unsupported option NO_AUTO_CREATE_USER and change `root`@`localhost` on next line to the actual user (i.e. `smithereen`@`%`).

That's all.

handlerug commented 3 years ago

I don't remember the exact things that were not compatible with MySQL 8, but the SQL dump has probably changed a million times since this PR. So yeah it may be as well closed

grishka commented 3 years ago

Actually, it's the stored procedure that breaks compatibility with MySQL 8, because apparently it does matter a lot which user created a procedure because it inherits that user's permissions or something. I'll fix it in the future by creating it from the code (with proper user) instead of the schema.

shadowlmd commented 3 years ago

@grishka, it's not completely incompatible, just requires few edits. ;)

shadowlmd commented 3 years ago

But stored procedure in scheme is not the only problem. Authentication won't work if user is created with default auth plugin in MySQL 8.

grishka commented 3 years ago

It now officially works with MySQL 8 as of commit 058605cf0ca1a69d7d58192a86d0a3460bebdecf, I only really needed two minor changes.