#1142 - REFERENCES command not allowed for user

Hello all,

I am trying to re-deploy app once-worked-here with freehosting (account epiz_29470932).
When running my sql scripts via phpMyAdmin, I get the following error message:

#1142 - REFERENCES command not allowed for user: 'epiz_29470932'@'192.168.0.6' for table 'my_table_name'

Based on [1] I have understood that this is not supported for freehosting because of used storage engine (InnoDB vs MyISAM).

Although, When I tried to query the used storage engine I get the following:

SELECT ENGINE FROM information_schema.TABLES WHERE TABLE_NAME = 'my_table_name' AND TABLE_SCHEMA = 'my_db'

ENGINE
InnoDB

When I tried to add privilege based on [2] I get:

GRANT REFERENCES
ON my_db.*
TO 'epiz_29470932'@'192.168.0.6'

#1044 - Access for user 'epiz_29470932'@'192.168.%' to database 'my_db' is not allowed

I can remember that even this year (07/2021) this was working on freehosting without any need to perform any additional actions (I deployed epiz_29136812 with foreign keys without problem).

When did this storage engine has changed for freehosting based on [1] please?
If it indeed changed, why can I see conflict with my query for used engine?
What am I doing wrong please? Is there a solution for freehosting please?

Thank you for your help.

[1] Permissions error when creating database
[2] mysql - What's the minimum privilege needed to alter a foreign key constraint? - Database Administrators Stack Exchange

Free hosting has always and only supported MyISAM. InnoDB, including foreign key support, has never been available.

Thank you for your answer. When I had removed the ‘foreign key’ line, I was able to create the tables.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.