Jag försöker importera från en .sql-fil till min MySQL-databas, men det vägrar fungera.
Så här ser .sql-filen ut:
#
# Table structure for table `scBookmarks`
#
CREATE TABLE `scBookmarks` (
`bId` int(11) NOT NULL auto_increment,
`uId` int(11) NOT NULL default '0',
`bIp` varchar(40) default NULL,
`bStatus` tinyint(1) NOT NULL default '0',
`bDatetime` datetime NOT NULL default '0000-00-00 00:00:00',
`bModified` datetime NOT NULL default '0000-00-00 00:00:00',
`bTitle` varchar(255) NOT NULL default '',
`bAddress` varchar(255) NOT NULL default '',
`bDescription` varchar(255) default NULL,
PRIMARY KEY (`bId`),
UNIQUE KEY `scBookmarks_bStatus_bId_bDatetime` (`bStatus`,`bId`,`bDatetime`),
KEY `scBookmarks_uId_bAddress` (`uId`,`bAddress`)
)
# --------------------------------------------------------
#
# Table structure for table `scCategories`
#
CREATE TABLE `scCategories` (
`id` int(11) NOT NULL auto_increment,
`bId` int(11) NOT NULL default '0',
`category` varchar(32) NOT NULL default '',
PRIMARY KEY (`id`),
UNIQUE KEY `scCategories_category_bId` (`category`,`bId`),
KEY `scCategories_bId` (`bId`)
)
# --------------------------------------------------------
#
# Table structure for table `scUsers`
#
CREATE TABLE `scUsers` (
`uId` int(11) NOT NULL auto_increment,
`username` varchar(25) NOT NULL default '',
`password` varchar(75) NOT NULL default '',
`uStatus` varchar(15) NOT NULL default 'active',
`uDatetime` datetime NOT NULL default '0000-00-00 00:00:00',
`uModified` datetime NOT NULL default '0000-00-00 00:00:00',
`name` varchar(50) NOT NULL default '',
`email` varchar(50) NOT NULL default '',
`homepage` varchar(100) default NULL,
`uContent` text,
PRIMARY KEY (`uId`)
)
# --------------------------------------------------------
#
# Table structure for table `scWatched`
#
CREATE TABLE `scWatched` (
`wId` int(11) NOT NULL auto_increment,
`uId` int(11) NOT NULL default '0',
`watched` int(11) NOT NULL default '0',
PRIMARY KEY (`wId`),
KEY `scWatched_uId` (`uId`)
)
Detta felmeddelande dyker upp:
MySQL sa:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE TABLE `scCategories` ( `id` int( 11 ) NOT NULL AUTO_INCREMENT ,
`' at line 12
Jag är väldigt dålig på SQL, så hjälp tas tacksamt emot.