-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Syntax Error Groups Set Permissions #6023
Comments
Looks like MySQL made some changes with this version, for testing purposes would you be able to try a previous version of MySQL and see if you experience the same behaviour? |
@EarlRamirez I plan on doing this tonight . I think you are correct and it's related to MySQL updates with the version |
@n-v-o will you be able to try a previous version of MySQL? |
@EarlRamirez Yeah, starting on this now, just going to remove 8.0.12 and install 5.7.23 Stack Traces: `[2018-08-01 23:16:17] production.ERROR: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 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 set permissions = ? where id = ?' at line 1 in C:\inetpub\wwwroot\snipe-it\Vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php:77 Next Doctrine\DBAL\Driver\PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 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 set permissions = ? where id = ?' at line 1 in C:\inetpub\wwwroot\snipe-it\Vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php:79 Next Illuminate\Database\QueryException: SQLSTATE[42000]: Syntax error or access violation: 1064 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 set permissions = ? where id = ?' at line 1 (SQL: update groups set permissions = {"admin":1,"users":1,"reports":1} where id = 1) in C:\inetpub\wwwroot\snipe-it\Vendor\laravel\framework\src\Illuminate\Database\Connection.php:647 |
@EarlRamirez Uninstalling 8.0.12 and installing 5.7.23, then going back through the steps did indeed resolve the issue. |
@n-v-o that is what I thought, will have to look at the release notes for MySQL version 8, there is also an issue with MariaDB version 10.2x, can't recall the precise version though, for now, the recommendations will be to stay on the version that works until we get these sorted. |
MariaDB 10.2.7+ will work fine with Snipe-IT version 5, since we were able to upgrade the required version of PHP needed to use the Doctrine package that handles that issue. This MySQL Community Edition v8 issue is brand new, and I'm still investigating what's happening here. First I'm seeing it. We haven't changed the way those permissions work recently, I don't think. |
I appreciate the investigation into this problem. This is my second/third time to setup Snipe IT this week and I keep running into issues. I'll try again using MariaDB or MySQL 5.7.23 |
There is a custom ISO that includes Snipe-IT basically, it just have to
boot the ISO and it will do the work for you, after you initial login
it will force you to change your credentials, generate the app_key and
migrate the DB, then you simply have to point your browser to the IP
address and you should be good to go.
You can give it a try, the link is here ==>
https://github.com/EarlRamirez/snipeit_iso
…--
Earl Ramirez <[email protected]>
On Thu, 2018-08-02 at 13:35 +0000, itnaturenates wrote:
I appreciate the investigation into this problem. This is my
second/third time to setup Snipe IT this week and I keep running into
issues. I'll try again using MariaDB or MySQL 5.7.23
|
@snipe I already started looking at the release notes, will have some bandwidth over the weekend. Will see what I can find and report back |
There were major changes with MySQL 8.0, commands were depreciated, new ones were added. One of the biggest change in this version is how authentication is managed. Based on the little research that I have done, PHP will need to be updated so that it can interface with MySQL 8.x before Snipe-IT can support it. |
Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. |
This issue has been automatically closed because it has not had recent activity. If you believe this is still an issue, please confirm that this issue is still happening in the most recent version of Snipe-IT and reply to this thread to re-open it. |
Hi, I am facing issue at http://localhost/setup/setup/migrate? (3/3) QueryException Exceptions copied from INSPECTOR: SQLSTATE[42000]: Syntax error or access violation: 1064 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 set permissions = ? where id = ?' at line 1 (SQL: update groups set permissions = {"admin":1,"users":1,"reports":1} where id = 1) I have read @n-v-o did not have after downgrading. Before downgrading my mysql version from 8.0 to 5.7. Sorry If I have overlooked the solution. |
I ended up having to use 5.7. |
Okay, it looks like this issue or feature request might still be important. We'll re-open it for now. Thank you for letting us know! |
Thank you, I would also use 5.7. |
Thank you @itnaturenates worked with mysql5.7 |
I'm having this issue with mariadb 10.3.11. Edit: Downgrading to 10.1.37 fixes the issue. |
This has to do with "groups" becoming a reserved word in MySQL 8+. It's easy enough to fix I've written about this in issue #6701 "Please support MySQL 8+ (and upgrade to Laravel 5.7)" |
Update: apparently the v5 update will be using Laravel 5.7 and will support MySQL 8. So we just need to be patient. Yay!! |
Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. |
This issue has been automatically closed because it has not had recent activity. If you believe this is still an issue, please confirm that this issue is still happening in the most recent version of Snipe-IT and reply to this thread to re-open it. |
Expected Behavior (or desired behavior if a feature request)
Setting up database tables in Pre-Flight, step 2.
Actual Behavior
Getting 3 errors.
(3/3) QueryException
SQLSTATE[42000]: Syntax error or access violation: 1064 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 set permissions = ? where id = ?' at line 1 (SQL: update groups set permissions = {"admin":1,"users":1,"reports":1} where id = 1)
(2/3) PDOException
SQLSTATE[42000]: Syntax error or access violation: 1064 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 set permissions = ? where id = ?' at line 1
(1/3) PDOException
SQLSTATE[42000]: Syntax error or access violation: 1064 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 set permissions = ? where id = ?' at line 1
Please confirm you have done the following before posting your bug report:
Provide answers to these questions:
storage/logs
and your webserver's logs.Please do not post an issue without answering the related questions above. If you have opened a different issue and already answered these questions, answer them again, once for every ticket. It will be next to impossible for us to help you.
https://snipe-it.readme.io/docs/getting-help
The text was updated successfully, but these errors were encountered: