Title: Database Problem
Last modified: June 2, 2021

---

# Database Problem

 *  Resolved [Dmitry B](https://wordpress.org/support/users/bobrovde/)
 * (@bobrovde)
 * [5 years ago](https://wordpress.org/support/topic/database-problem-57/)
 * I am trying to upgrade a plugin from 2.4 to 4.1:
 * Failed to perform query “ALTER TABLE `wp_6_redirection_items` ADD `match_url`
   VARCHAR(2000) NULL DEFAULT NULL AFTER `url`” – Insufficient database permissions
   detected. Please give your database user appropriate permissions.
 * update log:
 * Message: Failed to perform query “ALTER TABLE `wp_6_redirection_items` ADD `match_url`
   VARCHAR(2000) NULL DEFAULT NULL AFTER `url`” – Insufficient database permissions
   detected. Please give your database user appropriate permissions.
    Installed:
   2.4 Next: 4.1 Debug: ALTER command denied to user ‘wordpress’@’localhost’ for
   table ‘wp_6_redirection_items’ CREATE TABLE `wp_6_redirection_items` ( `id` int(
   11) unsigned NOT NULL AUTO_INCREMENT, `url` mediumtext NOT NULL, `regex` int(
   11) unsigned NOT NULL DEFAULT ‘0’, `position` int(11) unsigned NOT NULL DEFAULT‘
   0’, `last_count` int(10) unsigned NOT NULL DEFAULT ‘0’, `last_access` datetime
   NOT NULL, `group_id` int(11) NOT NULL DEFAULT ‘0’, `status` enum(‘enabled’,’disabled’)
   NOT NULL DEFAULT ‘enabled’, `action_type` varchar(20) NOT NULL, `action_code`
   int(11) unsigned NOT NULL, `action_data` mediumtext, `match_type` varchar(20)
   NOT NULL, `title` varchar(50) DEFAULT NULL, PRIMARY KEY (`id`), KEY `url` (`url`(
   200)), KEY `status` (`status`), KEY `regex` (`regex`), KEY `group_idpos` (`group_id`,`
   position`), KEY `group` (`group_id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT
   CHARSET=utf8
 * CREATE TABLE `wp_6_redirection_groups` (
    `id` int(11) NOT NULL AUTO_INCREMENT,`
   name` varchar(50) NOT NULL, `tracking` int(11) NOT NULL DEFAULT ‘1’, `module_id`
   int(11) unsigned NOT NULL DEFAULT ‘0’, `status` enum(‘enabled’,’disabled’) NOT
   NULL DEFAULT ‘enabled’, `position` int(11) unsigned NOT NULL DEFAULT ‘0’, PRIMARY
   KEY (`id`), KEY `module_id` (`module_id`), KEY `status` (`status`) ) ENGINE=InnoDB
   AUTO_INCREMENT=3 DEFAULT CHARSET=utf8
 * CREATE TABLE `wp_6_redirection_logs` (
    `id` int(11) unsigned NOT NULL AUTO_INCREMENT,`
   created` datetime NOT NULL, `url` mediumtext NOT NULL, `sent_to` mediumtext, `
   agent` mediumtext NOT NULL, `referrer` mediumtext, `redirection_id` int(11) unsigned
   DEFAULT NULL, `ip` varchar(17) NOT NULL DEFAULT ”, `module_id` int(11) unsigned
   NOT NULL, `group_id` int(11) unsigned DEFAULT NULL, PRIMARY KEY (`id`), KEY `
   created` (`created`), KEY `redirection_id` (`redirection_id`), KEY `ip` (`ip`),
   KEY `group_id` (`group_id`), KEY `module_id` (`module_id`) ) ENGINE=InnoDB AUTO_INCREMENT
   =1486 DEFAULT CHARSET=utf8
 * CREATE TABLE `wp_6_redirection_404` (
    `id` int(11) unsigned NOT NULL AUTO_INCREMENT,`
   created` datetime NOT NULL, `url` varchar(255) NOT NULL DEFAULT ”, `agent` varchar(
   255) DEFAULT NULL, `referrer` varchar(255) DEFAULT NULL, `ip` int(10) unsigned
   NOT NULL, PRIMARY KEY (`id`), KEY `created` (`created`), KEY `url` (`url`), KEY`
   ip` (`ip`), KEY `referrer` (`referrer`) ) ENGINE=InnoDB AUTO_INCREMENT=35446 
   DEFAULT CHARSET=utf8
 * Stage: add_match_url_400

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [5 years ago](https://wordpress.org/support/topic/database-problem-57/#post-14511239)
 * The problem is shown above:
 * > Insufficient database permissions detected. Please give your database user 
   > appropriate permissions
 * You will need the appropriate permissions to change your database.
 *  Thread Starter [Dmitry B](https://wordpress.org/support/users/bobrovde/)
 * (@bobrovde)
 * [5 years ago](https://wordpress.org/support/topic/database-problem-57/#post-14511284)
 * Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Database Problem’ is closed to new replies.

 * ![](https://ps.w.org/redirection/assets/icon-256x256.jpg?rev=983639)
 * [Redirection](https://wordpress.org/plugins/redirection/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/redirection/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/redirection/)
 * [Active Topics](https://wordpress.org/support/plugin/redirection/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redirection/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redirection/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Dmitry B](https://wordpress.org/support/users/bobrovde/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/database-problem-57/#post-14511284)
 * Status: resolved