gpt4 book ai didi

phpmyadmin 上的 MySQL 查询在本地主机上工作但在远程服务器上失败

转载 作者:太空宇宙 更新时间:2023-11-03 10:46:30 26 4
gpt4 key购买 nike

当我在本地主机上运行时,我有一些查询可以 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
)

谢谢。

关于phpmyadmin 上的 MySQL 查询在本地主机上工作但在远程服务器上失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31041570/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com