MySQL 对 phpmyadmin 的查询在本地主机上有效,但在远程服务器上失败
MySQL queries on phpmyadmin works on localhost but fails in remote server
当我在我的本地主机上 运行 时,我有一些查询可以 100% 工作,但是当我尝试 运行 然后远程时,它们给我语法错误。
这是其中一个查询:
CREATE TABLE IF NOT EXISTS `customer` (
`id` int(11) NOT NULL,
`phone` text,
`date_modified` datetime(6) DEFAULT NULL,
`first_name` text,
`customer_id` int(11) DEFAULT NULL,
`store_credit` text,
`registration_ip_address` text,
`last_name` text,
`tax_exempt_category` text,
`date_created` datetime(6) DEFAULT NULL,
`email` text,
`notes` text,
`company` text,
`customer_group_id` int(11) DEFAULT NULL
)
这里是错误:
MySQL said: Documentation
#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 '(6) DEFAULT NULL, `first_name` text, `customer_id` int(11) DEFAULT NULL,' at line 4
奇怪的是,这是完全相同的查询!我尝试在我拥有的两个不同的托管服务上远程 运行,它们都给我相同的语法错误。
我不知道怎么解决。有人知道可能是什么吗?
我认为您的 Mysql 版本较低。能执行看看吗
CREATE TABLE IF NOT EXISTS `customer` (
`id` int(11) NOT NULL,
`phone` text,
`date_modified` datetime DEFAULT NULL,
`first_name` text,
`customer_id` int(11) DEFAULT NULL,
`store_credit` text,
`registration_ip_address` text,
`last_name` text,
`tax_exempt_category` text,
`date_created` datetime DEFAULT NULL,
`email` text,
`notes` text,
`company` text,
`customer_group_id` int(11) DEFAULT NULL
)
谢谢。
当我在我的本地主机上 运行 时,我有一些查询可以 100% 工作,但是当我尝试 运行 然后远程时,它们给我语法错误。
这是其中一个查询:
CREATE TABLE IF NOT EXISTS `customer` (
`id` int(11) NOT NULL,
`phone` text,
`date_modified` datetime(6) DEFAULT NULL,
`first_name` text,
`customer_id` int(11) DEFAULT NULL,
`store_credit` text,
`registration_ip_address` text,
`last_name` text,
`tax_exempt_category` text,
`date_created` datetime(6) DEFAULT NULL,
`email` text,
`notes` text,
`company` text,
`customer_group_id` int(11) DEFAULT NULL
)
这里是错误:
MySQL said: Documentation
#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 '(6) DEFAULT NULL, `first_name` text, `customer_id` int(11) DEFAULT NULL,' at line 4
奇怪的是,这是完全相同的查询!我尝试在我拥有的两个不同的托管服务上远程 运行,它们都给我相同的语法错误。
我不知道怎么解决。有人知道可能是什么吗?
我认为您的 Mysql 版本较低。能执行看看吗
CREATE TABLE IF NOT EXISTS `customer` (
`id` int(11) NOT NULL,
`phone` text,
`date_modified` datetime DEFAULT NULL,
`first_name` text,
`customer_id` int(11) DEFAULT NULL,
`store_credit` text,
`registration_ip_address` text,
`last_name` text,
`tax_exempt_category` text,
`date_created` datetime DEFAULT NULL,
`email` text,
`notes` text,
`company` text,
`customer_group_id` int(11) DEFAULT NULL
)
谢谢。