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
Scheduler fails with "LOCK TABLES privilege not granted" #14167
Comments
Do the privileges need to be flushed maybe? In general if MySQL says it doesn't have the permission, then it doesn't. Maybe a different user is used, or there is another user configured that isn't |
Locking the matomo tables via the mysql console with the same user will work without any warnings. |
Did you check if eg the same user is defined multiple times in MySQL? |
Yes it is the same user, and it is only one time defined in the database. |
I have the same problems since a few months. It only occurs every few days for me (I guess this particular job is run seldomly).
So matomo should be able to lock tables. |
Can you execute |
It locks successful. MariaDB [matomo]> SELECT GET_LOCK('foo', 1);
+--------------------+
| GET_LOCK('foo', 1) |
+--------------------+
| 1 |
+--------------------+
1 row in set (0.000 sec) |
I suppose eg this works as well ?
In general this really looks like some MySQL configuration issue. If it says it doesn't have the |
Hm, you’re right, seems to work. MariaDB [matomo]> LOCK TABLES piwik_user WRITE;
ERROR 1146 (42S02): Table 'matomo.piwik_user' doesn't exist
MariaDB [matomo]> LOCK TABLES matomo_user WRITE;
Query OK, 0 rows affected (0.000 sec)
MariaDB [matomo]> UNLOCK TABLES;
Query OK, 0 rows affected (0.000 sec) I ran |
Sorry forgot to mention the prefix might be |
On my systems I can say, that FLUSH PRIVILEGES will not be the problem. |
Today, on time ;), 5 days later the issue turned up again.
|
I suggest you maybe ask in the forums: https://forum.matomo.org maybe someone can help there. Or maybe there's something on google about this. Clearly MySQL thinks |
I'm hit by this issue too. Same MariaDB version. |
Matomo version: 3.8.1
DB: MariaDB 10.1.38
When the cron job runs, I see this error message in the log:
But the user has all rights for the database:
The text was updated successfully, but these errors were encountered: