Now that InnoDB is here, I’m trying to setup Flarum, just to see how it will work here on InfinityFree. When trying to set it up, the SQL error below is returned.
1142 - REFERENCES command denied to user ‘epiz_27613109’@‘192.168.0.6’ for table ‘users’
The same error is given if I try to run the SQL script in the MySQL section of the control panel.
SQL Code
SINGLE LINE
CREATE TABLE `access_tokens` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `token` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL, `user_id` int(10) unsigned NOT NULL, `last_activity_at` datetime NOT NULL, `created_at` datetime NOT NULL, `type` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `title` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `last_ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `last_user_agent` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `access_tokens_token_unique` (`token`), KEY `access_tokens_user_id_foreign` (`user_id`), KEY `access_tokens_type_index` (`type`), CONSTRAINT `access_tokens_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
MULTI LINE
CREATE TABLE
access_tokens(idint(10) unsigned NOT NULL AUTO_INCREMENT,tokenvarchar(40) COLLATE utf8mb4_unicode_ci NOT NULL,user_idint(10) unsigned NOT NULL,last_activity_atdatetime NOT NULL,created_atdatetime NOT NULL,typevarchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,titlevarchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,last_ip_addressvarchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,last_user_agentvarchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, PRIMARY KEY (id), UNIQUE KEYaccess_tokens_token_unique(token), KEYaccess_tokens_user_id_foreign(user_id), KEYaccess_tokens_type_index(type), CONSTRAINTaccess_tokens_user_id_foreignFOREIGN KEY (user_id) REFERENCESusers(id) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
I think the error may be in here somewhere (Last Part)
CONSTRAINT
access_tokens_user_id_foreignFOREIGN KEY (user_id) REFERENCESusers(id) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
*Please do not ask for the domain. Since the form is not yet setup, someone can mess it up very easily
Admin, the username is “epiz_27613109”, and the domain name it is under should be obvious.