• Resolved cr0co

    (@cr0co)


    how to fix this problem ?

    Unexpected database error.<br><br>Try to repair database<br><br>Your database user has limited access and isn’t able to run DROP or ALTER database commands. Contact your server host and ask them to fix this for you!<br><br><b>Duplicate key name ‘application'</b><br>ALTER TABLE ps_nextend2_section_storage ADD INDEX application (application, section(50), referencekey(50))

    CREATE TABLExxxx_nextend2_smartslider3_slides` (
    id int(11) NOT NULL AUTO_INCREMENT,
    title varchar(200) NOT NULL,
    slider int(11) NOT NULL,
    publish_up datetime /* mariadb-5.3 */ NOT NULL DEFAULT ‘1970-01-01 00:00:00’,
    publish_down datetime /* mariadb-5.3 */ NOT NULL DEFAULT ‘1970-01-01 00:00:00’,
    published tinyint(1) NOT NULL,
    first int(11) NOT NULL,
    slide longtext DEFAULT NULL,
    description text NOT NULL,
    thumbnail varchar(255) NOT NULL,
    params text NOT NULL,
    ordering int(11) NOT NULL,
    generator_id int(11) NOT NULL,
    PRIMARY KEY (id),
    KEY published (published),
    KEY publish_up (publish_up),
    KEY publish_down (publish_down),
    KEY generator_id (generator_id),
    KEY ordering (ordering),
    KEY slider (slider),
    KEY thumbnail (thumbnail(100))
    ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci`

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Gabor

    (@nextendweb_gabor)

    Hi @cr0co!

    The important part of that message is this:
    “Your database user has limited access and isn’t able to run DROP or ALTER database commands. Contact your server host and ask them to fix this for you!”

    So you should ask your server host to make your database user have permission to do DROP and ALTER database commands. This documentation can explain this further if needed:
    https://smartslider.helpscoutdocs.com/article/1994-database-issues#duplicate

    Thread Starter cr0co

    (@cr0co)

    You might re-open the support case on the plugin developers’ support portal to continue checking the issue as it is not related to the MySQL user permissions. Please feel free to come back to us if any new information from the developers appears. We will be glad to assist you further.

    Plugin Support Gabor

    (@nextendweb_gabor)

    This is the file, that causes your problem:
    \wp-content\plugins\smart-slider-3\Nextend\SmartSlider3\Install\Tables.php
    from line 95.:

    $hasIndex = Database::queryRow(Database::parsePrefix("SHOW INDEXES FROM '#__nextend2_section_storage' WHERE Key_name = 'application'"));
    if ($hasIndex) {
    	$this->query("ALTER TABLE '#__nextend2_section_storage' DROP INDEX 'application'");
    }
    
    ...
    
    $this->query("ALTER TABLE '#__nextend2_section_storage' ADD INDEX 'application' ('application', 'section'(50), 'referencekey'(50))");

    The logic behind the code is, that the $hasIndex checks whether or not application index exists.

    At the next line, if this index exists, it gets dropped.

    The last line creates the same index again, and this is where your error happens.

    There are two possible cases:
    1. This line doesn’t works:
    SHOW INDEXES FROM '#__nextend2_section_storage' WHERE Key_name = 'application'
    where we are checking the existence of the application index.

    2. This line doesn’t works:
    ALTER TABLE '#__nextend2_section_storage' DROP INDEX 'application'
    where the application index would be deleted.

    You should ask your server host why one of these wouldn’t work in your case. I suggest showing them our file, where they could debug which one, if they still doesn’t seem to figure out the error within their configuration. But at all our users where this issue happened before, 2. was the problem, due to wrong user permissions.

    • This reply was modified 1 year, 12 months ago by Gabor.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Your database user has limited access’ is closed to new replies.