Jump to content

[Solved] Error Creating Table In Db Discard Tablespaces


mrobo

Recommended Posts

I need help, I cant create table in my DB.

I get error SQL message:

#1813 - Tablespace for table '`mydb`.`j25_update_sites_extensions`' exists. Please DISCARD the tablespace before IMPORT.

 

How shoudl I discard it?

Thx!

Link to comment
Share on other sites

  • 2 weeks later...

I need help, I cant create table in my DB.

j25_update_sites_extensions

I was able to create it just fine

mysql> create table j25_update_sites_extensions (id int(6) unsigned auto_increment primary key, data varchar(30) not null);
Query OK, 0 rows affected (0.07 sec)

mysql> describe j25_update_sites_extensions;
+-------+-----------------+------+-----+---------+----------------+
| Field | Type            | Null | Key | Default | Extra          |
+-------+-----------------+------+-----+---------+----------------+
| id    | int(6) unsigned | NO   | PRI | NULL    | auto_increment |
| data  | varchar(30)     | NO   |     | NULL    |                |
+-------+-----------------+------+-----+---------+----------------+
2 rows in set (0.19 sec)

mysql> drop table j25_update_sites_extensions;
Query OK, 0 rows affected (0.01 sec)

What database user are you using to try to create the table?

Link to comment
Share on other sites

I am creating it from logged in cpanel trough phpadmin.

this sql query:

--

-- Table structure for table `j25_update_sites_extensions`

--

 

DROP TABLE IF EXISTS `j25_update_sites_extensions`;

/*!40101 SET @saved_cs_client = @@character_set_client */;

/*!40101 SET character_set_client = utf8 */;

CREATE TABLE `j25_update_sites_extensions` (

`update_site_id` int(11) NOT NULL DEFAULT '0',

`extension_id` int(11) NOT NULL DEFAULT '0',

PRIMARY KEY (`update_site_id`,`extension_id`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Links extensions to update sites';

/*!40101 SET character_set_client = @saved_cs_client */;

 

--

-- Dumping data for table `j25_update_sites_extensions`

--

 

LOCK TABLES `j25_update_sites_extensions` WRITE;

/*!40000 ALTER TABLE `j25_update_sites_extensions` DISABLE KEYS */;

INSERT INTO `j25_update_sites_extensions` (`update_site_id`, `extension_id`) VALUES (1,700),(2,700),(3,10003),(3,10010),(3,10066),(4,10010),(5,10011),(10,600),(13,10046),(14,10047),(15,10048),(16,10049),(19,10016),(20,10069),(22,10046),(23,10027),(24,10060);

/*!40000 ALTER TABLE `j25_update_sites_extensions` ENABLE KEYS */;

UNLOCK TABLES;

 

and I get this result:

Error

 

SQL query:

 

 

CREATE TABLE `j25_update_sites_extensions` (

`update_site_id` int(11) NOT NULL DEFAULT '0',

`extension_id` int(11) NOT NULL DEFAULT '0',

PRIMARY KEY (`update_site_id`,`extension_id`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Links extensions to update sites';

 

MySQL said: Documentation

#1813 - Tablespace for table '`mrobo_titan-ras`.`j25_update_sites_extensions`' exists. Please DISCARD the tablespace before IMPORT.

 

Link to comment
Share on other sites

ENGINE=InnoDB

Try backing up the database, delete the database entirely, recreate it, and restore the data from the backup. I suspect that since InnoDB was broken for so long and was recently reenabled the old broken InnoDB tables are still causing you issues.

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...