Phpmyadmin Error In Sql Syntax
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 error 1064 (42000): you have an error in your sql syntax; this site About Us Learn more about Stack Overflow the company Business Learn #1064 - you have an error in your sql syntax more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question you have an error in your sql syntax check the manual that corresponds to your mysql server version x Dismiss Join the Stack 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
Mysql Error 1064 (42000)
phpMyadmin - Error #1064 up vote 2 down vote favorite When trying to create this table 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 error code 1064 in mysql 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 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: C
Management Learn More WordPress Services WordPress Hosting Superior WordPress Performance Learn More WordPress Themes Best Free WordPress Designs Learn More 1064 error in mysql WordPress Tutorial Step-by-step WordPress Guide Learn More More Links: WordPress Plugins
Check The Manual That Corresponds To Your Mysql Server Version For The Right Syntax To Use Near '$$'
About WordPress WordPress FAQ WordPress Services Joomla Services Joomla Hosting Superior Joomla Performance Learn More Joomla
Mysql Server Version For The Right Syntax To Use Near '' At Line 1
Templates Best Free Joomla Designs Learn More Joomla Tutorial Step-by-step Joomla Guide Learn More More Links: Joomla Extensions About Joomla Joomla FAQ Joomla Services Our Technology Datacenters Data http://stackoverflow.com/questions/4679080/phpmyadmin-error-1064 Centers Top Speed Solutions Speed Technology Total Uptime 99.99% Monthly Uptime 99.999% Yearly Uptime 99.996% Uptime Technology Our Support 24/7 Amazingly Fast Support Phone Reply Time: Instantly Contact Us Chat Reply Time: Instantly Start Chat Tickets First Reply: 10 Minutes Post Ticket Support Team Devotion 100% Advanced Expertise Always Ready To Help Our Support About https://www.siteground.com/kb/1064_you_have_anerror_in_your_sql_syntax_error_in_phpmyadmin/ Us See Our Faces Meet the SiteGround People! Learn More See Our Values Get to know our guiding principles! Learn More Read Our Blog Learn what's cooking! Learn More Read Client Reviews What our clients think of us. Learn More Affiliates Home / cPanel / MySQL Databases / ‘1064 - You have an error in your SQL syntax' error in phpMyAdmin ‘1064 - You have an error in your SQL syntax' error in phpMyAdmin Sometimes, when you try to modify a database in phpMyAdmin, you can get this error message when you try to execute the SQL query: 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... This is a known issue in cPanel which occurs when you access your cPanel via the Access cPanel Normally button in your Customer Area. In other words, this issue appears when you access your cPanel using th
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 https://premium.wpmudev.org/forums/topic/does-anyone-know-the-solution-to-error-1064-for-phpmyadmin pts 773 pts LEVEL 7 Does anyone know the solution to error #1064 https://forums.cpanel.net/threads/phpmyadmin-error-1064-create-table-problem.213611/ for phpMyAdmin? I was just trying to upload a restore through the phpMyAdmin for a site and got this 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 'example_com_db.sql' at line 1 The backup was made error in with backWPup as a .tar.gz 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? you have an Or for some reason has that changed? 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
Plans & Pricing Partners Support Resources Preview Forums Forums Quick Links Search Forums New Posts Search titles only Posted by Member: Separate names with a comma. Newer Than: Search this thread only Search this forum only Display results as threads More... Useful Searches Recent Posts Resources Resources Quick Links Search Resources Most Active Authors Latest Reviews Feature Requests Defects Menu Log in Sign up The Community Forums Interact with an entire community of cPanel & WHM users! cPanel Forums > cPanel & WHM® (for Linux® Servers) > Database Discussions > This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More. phpMyAdmin - Error #1064 -- Create Table problem Discussion in 'Database Discussions' started by quantass, Jun 6, 2011. quantass Registered Joined: Jun 6, 2011 Messages: 3 Likes Received: 0 Trophy Points: 1 I am using CPanel 11 and the built in phpMyAdmin. I'm trying to import my SQL statements in but am getting the following 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 '`0`, `ip_address` varchar(16) NOT NULL DEFAULT `0`, `user_agent` varchar(5' at line 2 CREATE TABLE IF NOT EXISTS `ci_sessions` ( `session_id` varchar( 40 ) NOT NULL DEFAULT `0` , `ip_address` varchar( 16 ) NOT NULL DEFAULT `0` , `user_agent` varchar( 50 ) NOT NULL , `last_activity` int( 10 ) unsigned NOT NULL DEFAULT `0` , `user_data` text NOT NULL , PRIMARY KEY ( `session_id` ) ) ENGINE = MYISAM DEFAULT CHARSET = latin1;Click to expand... Any clue as to the issue? My local mySQL is version 5.1.41 and was used to export the statement. #1 quantass, Jun 6, 2011 cPanelTristan Quality Assurance Analyst Staff Member Joined: Oct 2, 2010 Messa