douxun2023 2015-10-22 21:21
浏览 48

mySQL语法中的错误是什么?

Exported a MySQL database on one of my servers and am trying to import it on my new server. All done through phpMyAdmin.

MySQL says

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 'CREATE TABLE IF NOT EXISTS jobs ( id mediumint(9) NOT NULL, title varc' at line 12

That area of code is

CREATE TABLE IF NOT EXISTS `jobs` (
  `id` mediumint(9) NOT NULL,
  `title` varchar(200) DEFAULT NULL,
  `descshort` varchar(400) DEFAULT NULL,
  `descr` varchar(7000) DEFAULT NULL,
  `postdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;

One thing I might note is that I exported this from phpMyAdmin version 4.4.4 and MySQL 5.6, to my new server which is running phpMyAdmin 4.5.02 and MySQL 5.6

Any idea what might be causing this?

EDIT:

The table created before it successfully is

CREATE TABLE IF NOT EXISTS `horses` (
  `id` mediumint(9) NOT NULL,
  `bgcolor` varchar(7) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `bgimgurl` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `htop` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `hbottom` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ptext` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `linktext` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `linktarget` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sord` int(11) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥30 深度学习,前后端连接
    • ¥15 孟德尔随机化结果不一致
    • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
    • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
    • ¥15 谁有desed数据集呀
    • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
    • ¥15 关于#hadoop#的问题
    • ¥15 (标签-Python|关键词-socket)
    • ¥15 keil里为什么main.c定义的函数在it.c调用不了
    • ¥50 切换TabTip键盘的输入法