Error 1064 Phpmyadmin
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 Overflow the company Business mysql error 1064 Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation
Phpmyadmin Error 1064 Import
Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like erreur 1064 phpmyadmin 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 in my db, I get an error: #1064 error 1064 (42000): you have an error in your sql syntax; - 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 default '0', PRIMARY KEY (reminder_id), KEY reminder_id (reminder_id) ) TYPE=MyISAM; Can anyone
1064 Mysql
see what I'm doing wrong? mysql phpmyadmin mysql-error-1064 share|improve this question edited Jan 13 '11 at 10:58 ajreal 36.6k75899 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 13 '11 at 10:37 middaparka 42.3k894104 Thanks for that. –En-Motion Jan 13 '11 at 11:32 @En-Motion - No problem. :-) –m
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 mysql error 1064 (42000) Stack Overflow the company Business Learn more about hiring developers or posting ads with #1064 - you have an error in your sql syntax us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is
You Have An Error In Your Sql Syntax Check The Manual That Corresponds To Your Mysql Server Version
a community of 4.7 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 favorite okay so i have http://stackoverflow.com/questions/4679080/phpmyadmin-error-1064 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 - You have an error in your SQL syntax; http://stackoverflow.com/questions/32163053/phpmyadmin-error-1064 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) NOT NULL, `Email` varchar(145) NOT NULL, PRIMARY KEY (`P_id`) ) TYPE=InnoDB AUTO_INCREMENT=5 AUTO_INCREMENT=5 ; -- -- Dumping data
Extensions Demos Logo Documentation Take the Tour Tutorials Class Reference Wiki Guide 2.0 Class Reference 2.0 Screencasts Resources Development Contribute to Yii Latest Updates Report a Bug Report a Security Issue Community Forum Live http://www.yiiframework.com/forum/index.php/topic/24958-solved-mysql-error-1064-sql-syntax/ Chat News Hall of Fame Badges search Yii Framework Forum: [SOLVED] mySQL Error https://forums.cpanel.net/threads/phpmyadmin-error-1064-create-table-problem.213611/ #1064 - SQL syntax - Yii Framework Forum Jump to content Sign In » New user? Register Now! Help Search Advanced ForumsMembers Yii Framework Forum > Archives > Agile Web Application Development with Yii1.1 and PHP5 View New Content Page 1 of 1 You cannot start a new topic This topic is error 1064 locked [SOLVED] mySQL Error #1064 - SQL syntax pp 96 97 single quotes vs backquotes for CREATE TABLE #1 windsor Junior Member Group: Members Posts: 63 Joined: 04-October 11 Location:Tampa, FL Posted 21 October 2011 - 03:48 PM Getting 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 you have an to use near ''tbl_project_user_assignment' ( 'project_id' Int(11) NOT NULL, 'user_id' Int(11)' at line 1 When trying to import this SQL statement using phpMyAdmin and mySQL CREATE TABLE IF NOT EXISTS 'tbl_project_user_assignment' ( 'project_id' Int(11) NOT NULL, 'user_id' Int(11) NOT NULL, 'create_time' DATETIME, 'create_user_id' INTEGER, 'update_time' DATETIME, 'update_user_id' INTEGER, PRIMARY KEY ('project_id','user_id') ) ENGINE = InnoDB ; What worked for me is to change the single quotes to back quotes like below: CREATE TABLE IF NOT EXISTS `tbl_project_user_assignment` ( `project_id` Int(11) NOT NULL, `user_id` Int(11) NOT NULL, `create_time` DATETIME, `create_user_id` INTEGER, `update_time` DATETIME, `update_user_id` INTEGER, PRIMARY KEY (`project_id`,`user_id`) ) ENGINE = InnoDB ; I don't know why this worked, but it did This is my environment: MySQL Server: localhost via TCP/IPServer version: 5.5.16Protocol version: 10User: root@localhost MySQL charset: UTF-8 Unicode (utf8) Web server Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1MySQL client version: mysqlnd 5.0.8-dev - 20102224 - $Revision: 310735 $PHP extension: mysql phpMyAdmin Version information: 3.4.5, latest stable version: 3.4.6 0 Back to top of the page up there ^ Forum Home News and announcements |-- Framework news |-- Meetups and Conferences |-- Yii-powered Applications Yii 2.0 |-- General Discussions |-- Installation and Setup |-- Tips
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 Messages: 7,623 Likes Received: 19 Trophy Points: 38 Location: somewhere over the rainbow cPanel Access Level: Root Administrator Just to clarify, you used the same server to export the statement that you are using to import the statement with both running the same MySQL version? Next, what is the exact statement you are using to import? It almost seems as if you aren't separating the ENGINE and DEFAULT CHARSET statements in any way. cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support Submit a ticket | Check an existing ticket #2 cPanelTristan, Jun 6, 2011 quantass Registered Joined: Jun 6, 2011 Messages: 3 Likes Received: 0 Trophy Points: 1 Actually my local MySQL is version 5.1.41 and the remote web server with C