Support

UNiTE, Remote CLI, eXtract Wizard

#3576 Kickstart error during db restore

Posted in ‘UNiTE and Remote CLI’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

PHP version
n/a
Tool
UNiTE
Tool version
n/a

Latest post by nicholas on Monday, 22 February 2010 10:00 CST

user7761
During database restoration, I get the following error. Can you tell me what I can do to enable kickstart to restore the db? Thanks!


Error at the line 0: CREATE TABLE `akb_banner` ( `bid` int(11) NOT NULL AUTO_INCREMENT, `cid` int(11) NOT NULL DEFAULT '0', `type` varchar(30) NOT NULL DEFAULT 'banner', `name` varchar(255) NOT NULL DEFAULT '', `alias` varchar(255) NOT NULL DEFAULT '', `imptotal` int(11) NOT NULL DEFAULT '0', `impmade` int(11) NOT NULL DEFAULT '0', `clicks` int(11) NOT NULL DEFAULT '0', `imageurl` varchar(100) NOT NULL DEFAULT '', `clickurl` varchar(200) NOT NULL DEFAULT '', `date` datetime DEFAULT NULL, `showBanner` tinyint(1) NOT NULL DEFAULT '0', `checked_out` tinyint(1) NOT NULL DEFAULT '0', `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `editor` varchar(50) DEFAULT NULL, `custombannercode` text, `catid` int(10) unsigned NOT NULL DEFAULT '0', `description` text NOT NULL, `sticky` tinyint(1) unsigned NOT NULL DEFAULT '0', `ordering` int(11) NOT NULL DEFAULT '0', `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `tags` text NOT NULL, `params` text NOT NULL, PRIMARY KEY (`bid`), KEY `viewbanner` (`showBanner`), KEY `idx_banner_catid` (`catid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Query:DROP TABLE IF EXISTS `akb_banner`;

MySQL: MySQL query failed with error 1142 (DROP command denied to user 'C279008_admin'@'98.130.0.202' for table 'jos_banner'). The query was:DROP TABLE IF EXISTS `jos_banner`;

dlb
That looks like a permissions problem with your MySQL user. The MySQL user should have all permissions for this database. In this case, the user does not have permission to DROP the existing table, which prevents the restore function from restoring the backup table.

The right way to fix this is to give your MySQL user all rights to the database. An alternate method is to manually drop the tables before you do the restore.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

user7782
I have a similar problem but the error message is:

DROP TABLE IF EXISTS `akb_banner`;

MySQL: MySQL query failed with error 6 (Error on delete of '.\mdash\mduk_banner.MYI' (Errcode: 13)). The query was:DROP TABLE IF EXISTS `mduk_banner`;

It worked OK, in the same database and same user with one set of table prefixes but not the other. I was using a common user with ALL privileges. This is on my localhost.

I have tried with root, a specific user and created a new user with all privileges.

I am using Kickstart 2.3.2 with JoomlaPack 2.3.3 Plus with some (based on prefix) DB tables and directories excluded. I have same problem with both version 3 and 4 installer.

For Information: initially it did not want to restore administrator and some other directories but I got over that (not sure how) even though it was working on another set of tables for another site (same db, different prefix/directory. It has only been a problem since I went from 2.3.3 to Plus and added exclsuions to backup different sites in same database separately.

Any thoughts? I do not really want to have to go to the extra work of a multi step process with manual dropping of tables. It shoudld be possible as it is working for my other site.

dlb
The user permissions are normally set on a database level. I think they can be set per table, but I wouldn't even know how, so that doesn't seem a likely cause. I'll ask Nicholas to look a this.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

nicholas
Akeeba Staff
Manager
I can tell you that there are two things you might want to check. First, make sure that the database user has adequate privileges to drop the table. This might not always be the case, you can check it with your host. Then, it is possible that if the tables are open (something was reading data off them) the drop fails. In this case you can issue a FLUSH TABLES (using your host's copy of phpMyAdmin, for example) to make sure there are no open table files.

Also, both JPI3 and JPI4 have an option to backup old tables instead of dropping them. You might want to use them as a temporary mitigation problem.

Finally, you may want to upgrade to the recently released JoomlaPack 2.4 stable, as it has some major improvements in the database backup and restoration engines.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user8383
Thanks Nicholas,
I had the same error information. and I checked the database privileges, it hadn't set to have the privileges to Drop, i think that is the cause of the problem. set the right privileges and problem is gone

nicholas
Akeeba Staff
Manager
Yup, you need to be able to drop tables during the restoration phase, no matter if you use the drop old tables or backup old tables method. Same goes for installing a fresh Joomla! installation on top of an existing site using the same database table prefix.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!