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

Groups is a reserved keyword in MySQL 8 #2

Closed
edwinm opened this issue Sep 8, 2020 · 3 comments
Closed

Groups is a reserved keyword in MySQL 8 #2

edwinm opened this issue Sep 8, 2020 · 3 comments

Comments

@edwinm
Copy link

edwinm commented Sep 8, 2020

When trying to run the code from this repo, I got the following error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups AS g ON g.g_id=u.group_id LEFT JOIN online AS o ON o.ident='x-my-ip-x' at line 1

This occurs in the function set_default_user().

It turns out groups is a reserved keyword in MySQL 8.

See https://dev.mysql.com/doc/refman/8.0/en/keywords.html

Solution:

  1. Rename the table groups to something else
  2. Maybe it's possible to run MySQL in version 7 compatible mode
@MioVisman
Copy link
Owner

To solve, you just need to specify the prefix of the database tables during installation.

If tables have already been created, then

  1. set a prefix in your config.php file, exemle $db_prefix = 'forum_';
  2. add this prefix to all tables in your database

@edwinm
Copy link
Author

edwinm commented Sep 8, 2020

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants