Phpmyadmin Mysql Said Error 1064
Contents |
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 error 1064 (42000): you have an error in your sql syntax; Overflow the company Business Learn more about hiring developers or posting ads with us
1064 Mysql
Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community mysql error 1064 (42000) of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up phpMyadmin - Error #1064 up vote 2 down vote favorite When trying to create this table error code 1064 in mysql in my db, I get an 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 'unsigned NOT NULL default '0', PRIMARY KEY (reminder_id), KEY reminder_id (rem' at line 5 CREATE TABLE reminder_events ( reminder_id bigint(20) unsigned NOT NULL auto_increment, reminder_name varchar(255) NOT NULL default '', reminder_desc text, reminder_date varchar(8) unsigned NOT NULL
You Have An Error In Your Sql Syntax Check The Manual That Corresponds To Your Mysql Server Version
default '0', PRIMARY KEY (reminder_id), KEY reminder_id (reminder_id) ) TYPE=MyISAM; Can anyone see what I'm doing wrong? mysql phpmyadmin mysql-error-1064 share|improve this question edited Jan 13 '11 at 10:58 ajreal 36.7k85899 asked Jan 13 '11 at 10:34 En-Motion 30421025 add a comment| 3 Answers 3 active oldest votes up vote 2 down vote accepted The problem is that you're trying to define a text field (varchar) as being unsigned, which is something that can only apply to a numerical field. i.e.: "reminder_date varchar(8) unsigned NOT NULL default '0'," makes no sense. However, as the field is called "reminder_date", I'm guessing you're attempting to store a date, in which case you really want to use MySQLs DATE field type. e.g.: "reminder_date DATE NOT NULL," Additionally, if you're going to want to search on any of these fields, you should also add some indexes to speed up the searches. So, if you wanted to be able to search on the name and date, you could use: CREATE TABLE reminder_events ( reminder_id bigint(20) unsigned NOT NULL auto_increment, reminder_name varchar(255) NOT NULL DEFAULT '', reminder_desc text, reminder_date DATE NOT NULL, PRIMARY KEY (reminder_id), KEY reminder_id (reminder_id), KEY reminder_name (reminder_name), KEY reminder_date (reminder_date) ) TYPE=MyISAM; share|improve this answer edited Jan 13 '11 at 10:44 answered Jan 1
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 #1064 - you have an error in your sql syntax Learn more about Stack Overflow the company Business Learn more about hiring developers check the manual that corresponds to your mysql server version for the right syntax to use near '$$' or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack
Mysql Server Version For The Right Syntax To Use Near '' At Line 1
Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up PhpMyadmin error #1064 up vote 0 down vote http://stackoverflow.com/questions/4679080/phpmyadmin-error-1064 favorite okay so i have transferred my website % database over from an old computer which had now died and am trying to set it up on my own mac locally however I am running into a few issues. As of now i have setup xampp and phpmyadmin however when i try to import my .sql database. I am getting an error: MySQL said: Documentation 1064 - http://stackoverflow.com/questions/32163053/phpmyadmin-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 AUTO_INCREMENT=3 AUTO_INCREMENT=3' at line 31 -- version 2.8.0.1 -- http://www.phpmyadmin.net -- Host: custsql-ipg68.eigbox.net -- Generation Time: Aug 22, 2015 at 05:57 AM -- Server version: 5.5.44 -- PHP Version: 4.4.9 -- Database: blake -- -- Table structure for table doctor CREATE TABLE `doctor` ( `D_id` int(11) NOT NULL AUTO_INCREMENT, `D_name` varchar(145) NOT NULL, `D_SSn` varchar(145) NOT NULL, `Age` varchar(145) NOT NULL, `Phone` varchar(145) NOT NULL, `Address` varchar(145) NOT NULL, `city` varchar(145) NOT NULL, `state` varchar(145) NOT NULL, `zip` varchar(145) NOT NULL, `office` varchar(145) NOT NULL, PRIMARY KEY (`D_id`) ) TYPE=InnoDB AUTO_INCREMENT=3 AUTO_INCREMENT=3 ; -- -- Dumping data for table doctor INSERT INTO `doctor` VALUES (1, 'David Jones', '123-64-2654', '48', '134-264-4567', '1234 st boulevard', 'Los Angeles', 'CA', '12345', '123456789'); -- -- Table structure for table patient CREATE TABLE `patient` ( `P_id` int(11) NOT NULL AUTO_INCREMENT, `P_Name` varchar(145) NOT NULL, `P_SSn` varchar(145) NOT NULL, `BirthDate` varchar(145) NOT NULL, `Phone` varchar(145) NOT NULL, `Address` varchar(145) NOT NULL, `city` varchar(145) NOT NULL, `state` varchar(145) NOT NULL, `zipcode` varchar(145) NOT NULL, `P_Lname` varchar(145) NOT NULL, `Gender` varchar(85) NO
Contact Work with us The Hub Log In Become a member New to the community? Start here Home Support Support Forums General wordpress Decura The Bug Hunter 468 pts 773 https://premium.wpmudev.org/forums/topic/does-anyone-know-the-solution-to-error-1064-for-phpmyadmin pts LEVEL 7 Does anyone know the solution to error #1064 for phpMyAdmin? I was just trying to upload a restore through the phpMyAdmin for a site and got this error: #1064 - You have http://superuser.com/questions/774229/getting-error-in-mysql-1064-error-while-creating-trigger an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'example_com_db.sql' at line 1 The backup was made with backWPup as a .tar.gz error 1064 file. I've tried finding a solution to this but came up empty handed after several attempts. All General WordPress Plugins & Themes Multisite Features & Feedback Comments 15 Jack Kitterhing Code Norris 13,192 pts 20,412 pts LEVEL 30 Hi there @Decura I hope you are well today and thanks for your question. Are you using myisam, InddoDB, something else? Is it set as UTF8? Or for some reason has that changed? you have an Have you got something like this in your DB backup http://stackoverflow.com/questions/4679080/phpmyadmin-error-1064 Please advise. Is this a single site install or a multisite install? Thank you! Kind Regards Jack. Decura The Bug Hunter 468 pts 773 pts LEVEL 7 @Jack Kitterhing backWPup has an option called DB Optimize that was selected. The selected table types to optimize is MyISAM and InnoDB tables. Other than that I don't use it. I do not know if this is set to UTF8 and there is nothing like the code from the link in the backup. Decura The Bug Hunter 468 pts 773 pts LEVEL 7 @Jack Kitterhing The hosting provider offers a 30-day manual restore for a fee so there is a plan b backup solution. However, several of my sites are using the same setup so I'm worried that this is a general error that might affect all of them. Decura The Bug Hunter 468 pts 773 pts LEVEL 7 @Jack Kittering The cause seems to be a version mismatch due to reserved words. No need to look further. I will opt in for plan b and try to figure something out after the restore. lol Site Builder, Child of Zeus 471 pts 248 pts LEVEL 4 Hi Decura, If it's a syntax
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 Super User Questions Tags Users Badges Unanswered Ask Question _ Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top getting error in mysql— #1064 error while creating trigger up vote -1 down vote favorite I need to create a trigger for a table called try.. which will execute after something is entered into the table..(I am using phpmyadmin mysql) But i am getting #1064 error while creating it.. My trigger contains BEGIN DECLARE aa decimal(4,3); DECLARE bb decimal(4,3); DECLARE cc decimal(4,3); DECLARE cur1 CURSOR FOR SELECT a,b,c FROM site; OPEN cur1 FETCH NEXT FROM cur1 into aa,bb,cc; WHILE FETCH_STATUS=0 BEGIN PRINT aa END END it shows an error like this 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 'FETCH NEXT FROM cur1 into aa,bb,cc; WHILE FETCH_STATUS=0 BEGIN PRINT aa END ' at line 7 I am a newbie to trigger..Help me... Thanks mysql database sql share|improve this question asked Jun 27 '14 at 17:37 sri 1 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote Your inconsistent use of the semi-colon to delimit your commands would be (at least part of) your problem. You need one at the end of each command. :) Open cur1 is a stand-alone command that should have a ; after it (as should your "Print" statement). Since it doesn't, then MySQL will interpret the two lines as a single command: OPEN cur1 FETCH NEXT FROM cur1 into aa,bb,cc; which is an invalid command. Edit after comment: As the error you reported says, you have syntax errors. It's (still) due to improper semi-colon usage, but you also have errors in your While statement usage. A While loop should have a do, and be ended with End While (no a