I have a clean new mysql database on my localhost, and also I have a project built on codeigniter PHP framework and have a copy of that project database.
However, when I import the database into my clean new database I already created I get this error message :
SQL query:
-- --------------------------------------------------------
--
-- Table structure for table `cr_addons`
--
CREATE TABLE `cr_addons` (
`addon_id` int(11) NOT NULL,
`addon_name` varchar(50) DEFAULT NULL,
`price` decimal(10,2) DEFAULT NULL,
`description` varchar(100) DEFAULT NULL,
`addon_image` varchar(50) DEFAULT NULL,
`status` enum('Active','Inactive') DEFAULT 'Active'
) ENGINE=InnoDB DEFAULT CHARSET=utf8
MySQL said: Documentation
#1050 - Table 'cr_addons' already exists
How could I have to delete a table where I already have an empty database!
Working on my local machine with apache and mysql (XAMPP Stack)
3
Answers
Execute
You’re new database might now be the default to be use my your client
Try setting the default DB schema by:
Or either explicitly defining in which schema the table is created in:
A simple solution I use is to re-export the database from production server. Initial export is possibly corrupt.