简体   繁体   中英

Syntax error when trying to link database in CPanel

I'm getting a "syntax error" when trying to upload my database on CPanel. The exact error message I am getting is:

/* Navicat PostgreSQL Data Transfer Source Server : daonguyenanbinh Source Server Version : 90204 Source Host : localhost Source Database : croomer Source Schema : public Target Server Version : 90204 File Encoding : utf-8 Date: 07/15/2014 07:54:52 AM */ -- ----- Table structure for users

DROP TABLE IF EXISTS "public"."users";

MySQL said:

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 '"public"."users"' at line 19.

Any ideas? Here is the SQL code, starting at line 19.

DROP TABLE IF EXISTS "public"."users";
CREATE TABLE "public"."users" (
    "id" int8 NOT NULL DEFAULT nextval('users_id_seq'::regclass),
    "title" varchar(100) COLLATE "default",
    "first_name" varchar(100) COLLATE "default",
    "last_name" varchar(100) COLLATE "default",
    "street" varchar(100) COLLATE "default",
    "city" varchar(100) COLLATE "default",
    "state" varchar(100) COLLATE "default",
    "zip" varchar(100) COLLATE "default",
    "email" varchar(100) COLLATE "default",
    "username" varchar(100) COLLATE "default",
    "password" varchar(300) COLLATE "default",
    "dob" varchar(100) COLLATE "default",
    "phone" varchar(100) COLLATE "default",
    "cell" varchar(100) COLLATE "default",
    "picture" varchar(100) COLLATE "default",
    "created_at" timestamp(6) NULL DEFAULT now(),
    "last_login" timestamp(6) NULL DEFAULT now(),
    "skills" varchar(300) COLLATE "default",
    "interests" varchar(300) COLLATE "default",
    "gender" varchar COLLATE "default"
)
WITH (OIDS=FALSE);
ALTER TABLE "public"."users" OWNER TO "daonguyenanbinh";

Can we see a bit more of where that sql query is in your php script? You've probably just referenced something wrong, shouldn't be too hard to spot :)

I cannot comment so I write here as an answer..

It seems like you are using Navicat for PostreSQL and you are trying to connect to MySQL server..

I think you need to use Navicat Premium in order to transfer data between different types of databases.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM