![](/img/trans.png)
[英]how to connect online mysql database server from local wamp server using php?
[英]Mysql DDL works on local wamp but does not import on online server
我在localhost wamp MySQL服務器上使用此架構,並且工作正常:
CREATE TABLE `tblcustomers` (
`customerid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`customername` varchar(50) NOT NULL,
`customerphone` varchar(11) DEFAULT NULL,
`customeraddress` varchar(255) DEFAULT NULL,
`registrationdate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
UNIQUE KEY `credid` (`customerid`),
UNIQUE KEY `credname` (`customername`),
UNIQUE KEY `customerid` (`customerid`)
) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=latin1;
MySQL說:文檔
#1067 - Invalid default value for 'registrationdate'
當我在聯機服務器上導入轉儲文件時,會收到上述消息。 怎么處理呢?
將registrationdate
數據類型從DATETIME
更改為TIMESTAMP
,您應該通過
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.