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

Error on startup #29

Open
hendisantika opened this issue Mar 1, 2021 · 6 comments
Open

Error on startup #29

hendisantika opened this issue Mar 1, 2021 · 6 comments

Comments

@hendisantika
Copy link

After running db:seed, I have this Error on startup:

image

Any suggestions?
Thanks

@gieart87
Copy link
Owner

gieart87 commented Mar 1, 2021

Hi Mas @hendisantika ,
I believe it's related to the sqlmode on your MySQL server. Could you please show me the sqlmode on your dbserver so that I can reproduce the issue?
I've tested this code on mysql version 5.7 and 8.x with the following sqlmode (demo url: http://108.61.222.138/course-larashop7/ )

Screen Shot 2021-03-02 at 06 37 44

Some people face that issue but I haven't reproduced it yet in my local. Thanks.

@hendisantika
Copy link
Author

Here's the result:

image

Is there something need to change?

@gieart87
Copy link
Owner

gieart87 commented Mar 1, 2021

It can be fixed by either updating the sql query or updating the sqlmode. But, I prefer to fix it by updating the query. Your sql_mode is a bit different from the default https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html . Adding the ONLY_FULL_GROUP_BY on the sqlmode may fix the issue if I'm not mistaken. Let me reproduce it first on my local.

@gieart87
Copy link
Owner

gieart87 commented Mar 2, 2021

still could not replicate the issue :))

@hendisantika
Copy link
Author

Could You tell me How to add ONLY_FULL_GROUP_BY?

@gieart87
Copy link
Owner

gieart87 commented Mar 2, 2021

Find your my.cnf file then add the sqlmode you want, e.g:
Screen Shot 2021-03-02 at 09 03 58

https://stackoverflow.com/questions/23921117/disable-only-full-group-by

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