access violation: 1142 INDEX command denied to user
Posted by: David Ledger
Date: March 31, 2020 04:47AM

Running on AWS Lightsail with LAMP virtual server. Lightsail with LAMP expects you to use AWS RDS database, but that is expensive and this is for a personal genealogy database. Apache comes pre-installed on such a server.

mysql version:- Ver 8.0.18 for linux-glibc2.12 on x86_64 (MySQL Community Server - GPL)

Using a Genealogy package 'phpgedview' that you point at an existing MySQL database.

Installed the above version of MySQL on the server and created a user called pgv43 and a new database also called pgv43 as the root user. Set GRANTS for user as:
mysql> show grants for pgv43;
+--------------------------------------------------------------------------------+
| Grants for pgv43@%
|
+--------------------------------------------------------------------------------+
| GRANT USAGE ON . TO pgv43@%
|
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX ON pgv43.*
TO pgv43@% |
+--------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

The phpgedview config settup produced the following error fir each table it created:
SQLSTATE[42000]: Syntax error or access violation: 1142 INDEX command denied to user pgv43'@'localhost' for table 'pgv_...'

with pgv_... being each of the created tables in turn. The tables were created. I have done this two or three times before on different servers without problem. With those GRANTs why should the user be denied INDEX rights?

Even if I set:
mysql> show grants for pgv43;
+--------------------------------------------------+
| Grants for pgv43@% |
+--------------------------------------------------+
| GRANT USAGE ON . TO pgv43@% |
| GRANT ALL PRIVILEGES ON pgv43.* TO pgv43@% |
+--------------------------------------------------+
2 rows in set (0.00 sec)

it produces the same error.

I've been working with Postgres recently, so I may have something obvious wrong. Any ideas please?

David

.

Options: ReplyQuote


Subject
Written By
Posted
access violation: 1142 INDEX command denied to user
March 31, 2020 04:47AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.