CREATE TABLE IF NOT EXISTS `tablename` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appID` int(11) NOT NULL,
`issueNo` varchar(100) DEFAULT NULL,
`issueTitle` varchar(255) DEFAULT NULL,
`issueKicker` varchar(255) DEFAULT NULL,
`productID` varchar(255) NOT NULL,
`publicationDate` datetime NOT NULL,
`price` double NOT NULL,
`description` varchar(500) DEFAULT NULL,
`status` enum('pending','publishing','published') DEFAULT NULL,
`updateTime` datetime NOT NULL,
`updateUser` varchar(50) NOT NULL,
`bscmsID` int(11) DEFAULT NULL,
`filter` varchar(255) DEFAULT NULL,
`portraitCoverID` int(11) DEFAULT NULL,
`uploadCover` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `status` (`status`),
KEY `appID` (`appID`),
KEY `publicationDate` (`publicationDate`)
) ENGINE=FEDERATED DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
CONNECTION='mysql://user:password@192.168.2.3:3306/dbname/tablename';
注意:密碼不能包含@否則會提示connection string的格式錯誤。
Suggested fix:
Allow the @ character to be escaped, or at least annotate this in the docs (I imagine other chars will also cause a problem, such as / and :. Perhaps the connection string could be specified as: "mysql://'username':'password'@'hostname.tld'/db/table"?
參考:http://bugs.mysql.com/bug.php?id=14810
分享到:
2014-10-20 11:53
浏览 621
分类:数据库
评论