Error 1064 In Mysql 5.5
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ERROR 1064 (42000) SQL syntax up vote 1 down vote favorite I am having trouble importing a schema in mysql. mysql -u user -p print < jasmine.sql ERROR 1064 (42000) at line 23: 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 '(14) NOT NULL, job_id tinytext NOT NULL, printer tinytext NOT NULL, `u' at line 3 Here is my code: CREATE TABLE `jobs_log` ( `id` mediumint(9) NOT NULL auto_increment, `date` timestamp(14) NOT NULL, `job_id` tinytext NOT NULL, `printer` tinytext NOT NULL, `user` tinytext NOT NULL, `server` tinytext NOT NULL, `title` tinytext NOT NULL, `copies` smallint(6) NOT NULL default '0', `pages` smallint(6) NOT NULL default '0', `options` tinytext NOT NULL, `doc` tinytext NOT NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM COMMENT='Lists all the jobs successfully sent for printing'; I am using Mysql-Server Version 5.5. mysql sql syntax-error share|improve this question edited Aug 25 '13 at 18:50 Nev 8791119 asked Aug 25 '13 at 18:22 Rubem Cerqueira 612 add a comment| 4 Answers 4 active oldest votes up vote 2 down vote Just use timestamp instead of timestamp(14). As far as i know, there is a timestamp(N) deprecation. share|improve this answer answered Aug 25 '13 at 18:28 nidhoeggr09 1086 add a comment| up vote 0 down vote timestamp doesnt have length property ! When upgrading to MySQL 5.5 or later, you must convert TYPE to use ENGINE instead. Try this : CREATE TABLE jobs_log ( id mediumint(9) NOT NULL auto_increment, date timestamp, job_id tinytext NOT NULL, printer tinytext NOT NULL, user tinytext NOT NULL, server tinytext NOT NULL, title tinytext NOT NULL, copies smallint(6) NOT NULL default '0', pages smallint(6) NOT NULL default '0', options tinytext NOT NULL, doc tinytext NOT NULL, PRIMARY KEY (id) )ENGINE = MyIsam COMMENT='Lists all the jobs successfully sent for printing'; share|improve this answer answered Aug 25 '1
DOMAINS WEB DESIGN WEB DESIGN SERVICES CREATE YOUR OWN WEBSITE SITE HOSTING TOOLS MEET US MEET US ABOUT US PARTNERS & AWARDS BLOG WE'RE HIRING CONTACT US AMP LOGIN SUPPORT CENTER Search Support Center Product Guides Dedicated Hosting Reseller Hosting KnowledgeBase Website Email Domain Names Reseller Billing Community Support Browse Questions Ask a Question User Submitted Articles Education Channels http://stackoverflow.com/questions/18432205/error-1064-42000-sql-syntax Android BoldGrid cPanel DokuWiki Drupal 7 Drupal 8 Everything Email Joomla 2.5 Joomla 3.1 K2 Magento 1.6 Mambo MediaWiki Moodle Movable Type OpenCart OpenCart 2.0 osCommerce PHP-Fusion PHP-Nuke phpBB phpList Premium Website Builder PrestaShop 1.5 PrestaShop 1.6 SMF Tiki Wiki VirtueMart 3 Web Hosting Manager http://www.inmotionhosting.com/support/website/database-troubleshooting/error-1064 Website Design WordPress Tools & Resources Email Configuration Blacklist Check Visual DNS Lookup Quick Tagger Icon Sets Favicon Generator Bounce Back Parser What is my IP address? >>Website .htaccess (17)Adobe Flash (2)APIs (2)Backup and Restore (15)Billing (8)Browser Issues (2)Connecting to a Database (5)cPanel (26)cPanel Account Management (16)Cron Jobs (4)Cube Cart (2)Database Setup (5)Database Troubleshooting (6)Domain Management (2)Dreamweaver (12)Drush (2)eCommerce (7)Elasticsearch (4)Fantastico (4)File Management (16)File Manager (6)FTP (10)FTP Client Setup (21)General Server Setup / Management (15)Getting Started Guides (18)Ghost (3)Google Tools (21)How To (23)HTML (2)Image Editing (2)IP Addresses (3)iWeb (1)JavaScript (2)Joomla (10)Joomla 2.5 (36)Koken (11)Linux (27)Logaholic (5)Magento (2)Maintaining Your Website (1)Managing Files (7)Microsoft FrontPage (11)Microsoft Publisher (1)ModSecurity (7) MODx (3)New Customers (7)Open Classifieds (1)PCI Compliance (7)PHP (15)PHP Configuration (7)PHP Troubleshooting (6)phpBB (25)phpMyAdmin (10)Premium Website Builder (22)Prestashop (1)Protecting Files (5)Publishing Your Site (2)Python (1)R
Ruetz Email Updates: Status: Not a Bug Impact on me: None Category:MySQL Server: Errors Severity:S2 (Serious) Version:5.5.8 OS:Microsoft Windows https://bugs.mysql.com/bug.php?id=59871 Assigned to: Tags: column name, error 1064, Field Name, maxvalue View Add Comment Files Developer Edit Submission View Progress Log Contributions [1 Feb 2011 15:13] Manuel Ruetz Description: MySQL http://www.heidisql.com/forum.php?t=8761 claims "You have an error in your SQL syntax..." when inserting or querying a table where a column is named 'maxValue' How to repeat: Create a table with a error 1064 field named 'maxValue': CREATE TABLE `test`.`test`( `index` INT UNSIGNED NOT NULL AUTO_INCREMENT, `maxValue` INT UNSIGNED, PRIMARY KEY (`index`)); Try to insert some data: INSERT INTO test (INDEX, maxValue) VALUES (1,2) Try to query data: SELECT INDEX, maxvalue FROM test; Suggested fix: When quotes are used in the query for the field names (`), the query is executed error 1064 in without any exceptions. I cannot find any hints about 'maxValue' is a reserved keyword or cannot be used as a field name. Even 'max' works as a field name. [1 Feb 2011 15:16] Peter Laursen It is listed here: http://dev.mysql.com/doc/refman/5.5/en/reserved-words.html (but not here: http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html) peter (not a MySQL person) [1 Feb 2011 15:36] Valerii Kravchuk Both INDEX and MAXVALUE are listed at http://dev.mysql.com/doc/refman/5.5/en/reserved-words.html. This is not a bug. Look: C:\Program Files\MySQL\MySQL Server 5.1\bin>mysql -uroot -proot -P3312 test Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 6 Server version: 5.5.8 MySQL Community Server (GPL) Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL v2 license Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> create table mv ( -> `index` INT UNSIGNED NOT NULL AUTO_INCREMENT, -> `maxValue` INT UNSIGNED, -> PRIMARY KEY (`index`));
08 Oct: Cross apply 08 Oct: HeidiSQL + SQLite 08 Oct: Title bar buttons flicker in Windows 10 07 Oct: Help with query 07 Oct: Postgres tree 07 Oct: Feature Request 07 Oct: Revision 4514 "Donate" button(s) 07 Oct: UI bug in window: User Manager? 06 Oct: ERROR: syntax error at or near "DETERMI ... 06 Oct: Crash when accessing database tab. 06 Oct: php query 06 Oct: Help.. lost connection to mysql server ... 06 Oct: Bug: Crash showing tooltip of MediumTex ... 05 Oct: 2 minor suggestions 05 Oct: Multiple "From IP"s in user manager 05 Oct: Remember queries between sessions (?RFC) 05 Oct: error: Received disconnect from 89.17.1 ... 05 Oct: Display issues with binary values DonateHow to donate List of donors HelpRequirements Connecting to a server Command line switches The database tree Creating a table Creating a view Creating a stored procedure Creating a trigger Creating a scheduled event The Data tab Running SQL queries SQL export HeidiSQL portable License Credits Error 1064 : SQL Syntax New topic Register Log in 3 posts Sierra_Ex posted 5 years ago in General Good morning, i have MySQL 5.5.13 and HeidiSQL 6.0.0.3603, i'm learning MySQL togheter with HeidiSQL from a book, it's a basic tutorial, the problem is, after I create a localhost, a databank and try to create a table, I get the following error: SQL Error 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 'Type = InnoDB' at line 13. Here is the code from my Query: OBS: Variables in Portuguese/BR ===//Code//== Create Table CaixaMovimento ( LancamentoCaixa integer primary key not null auto_increment, CodigoHistorico integer(3) not null default 0, Documento varchar(12) not null default "", Data date not null, Valor real(7,2) not null default 0.00 ) Type = innodb ; ==//End Code//== Sorry if that's too noob, I'm getting started now, I also put in the instalation support for InnoDB data, what I'm doing wrong? Thanks a lot! 6577 posts ansgar posted 5 years ago You should update to the latest build (Help > Check for updates) 3 posts Sierra_Ex posted 5 years ago Thanks for aswwer anse, but the problem still persists, now I have HeidiSQL 6.0.0.3891, but the error 1064 is still happening. 785 posts