Error 1064 42000 Create Table
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 error 1064 mysql 42000 create database more about Stack Overflow the company Business Learn more about hiring developers or posting
Error 1064 42000 You Have An Error In Your Sql Syntax
ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community
Error 1064 42000 At Line
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> on mysql when i'm trying to create
Error 1064 Sqlstate 42000
table up vote 0 down vote favorite 1 CREATE TABLE `photos` ( `title` varchar(255) not null, `id` int(11) not null, `ph_path` varchar(255) not null, `description` varchar(255) not null, `privilange` varchar(20) not null, `owner` varchar(60) not null, `provoles` int(11), PRIMARY KEY (`id`), ) ENGINE=InnoDB DEFAULT CHARSET=greek; I'm getting error 1064 <4200> and I'm not sure what is wrong. mysql mysql-error-1064 share|improve this question edited May 9 '12 at 17:42 error 1064 mysql 42000 mysqldump Chillie 762423 asked May 9 '12 at 17:30 user1385257 21139 The trailing comma after your PRIMARY KEY looks mighty suspect. –eggyal May 9 '12 at 17:31 add a comment| 2 Answers 2 active oldest votes up vote 3 down vote accepted You have a trailing comma in the primary key: PRIMARY KEY (`id`), <--- remove that The full error would read something like: check the manual that corresponds to your MySQL server version for the right syntax to use near ') ENGINE=InnoDB In MySQL, the position pointed to by the error message (near ')ENGINE) will show you the character immediately after where the error occurred. Look to the previous thing in your statement and you'll find your syntax error. share|improve this answer answered May 9 '12 at 17:31 Michael Berkowski 181k23271274 Yes i remove that but i'm still getting that error :S –user1385257 May 9 '12 at 17:38 @user1385257 Getting what error? What exact full error are you getting? –Michael Berkowski May 9 '12 at 17:39 ok it's done!!! i dont know the error was.. thanks anyway –user1385257 May 9 '12 at 17:42 add a comment| up vote 2 down vote You will have t
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and error 1064 (42000) mysql policies of this site About Us Learn more about Stack Overflow the error 1064 (42000) at line 1 company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags error 1064 mysql 42000 mysql import 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 http://stackoverflow.com/questions/10521118/error-1064-42000-on-mysql-when-im-trying-to-create-table takes a minute: Sign up MySQL Create Table Error 1064 up vote 0 down vote favorite I am trying to create a table in MySQL but it doesn't want to play: create table traders( traderID INT(9) ZEROFILL NOT NULL AUTO_INCREMENT UNSIGNED, traderProfileName VARCHAR(64) NOT NULL, traderPassword CHAR(128) NOT NULL, traderFirstName VARCHAR(40) NOT NULL, traderSurname VARCHAR(40) NOT NULL, traderContactPhone VARCHAR(14) NOT NULL, http://stackoverflow.com/questions/19367752/mysql-create-table-error-1064 locationPostCode CHAR(4) NOT NULL, traderEmail VARCHAR(120) NOT NULL, traderBio VARCHAR(255) DEFAULT NULL, traderReviewRating DECIMAL(5,2) DEFAULT NULL, traderLastLogin DATETIME DEFAULT NULL, PRIMARY_KEY(traderID) ); And I am getting error: "ERROR 1064 (42000): 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, traderProfileName VARCHAR(64) NOT NULL, traderPassword CHAR(128) NOT ' at line 2" Is this something simple as I am using incorrect parameters for the table settings? mysql database share|improve this question edited May 29 at 15:46 wogsland 2,83181235 asked Oct 14 '13 at 19:27 Jonlee 1614 also unsigned is not a valid mysql type. Read the manual ! You have an invalid type and a typo. –Lorenz Meyer Feb 3 '15 at 9:16 add a comment| 4 Answers 4 active oldest votes up vote 0 down vote Auto increment is an integer by default, no need to define unsigned. http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html share|improve this answer answered Oct 14 '13 at 19:33 Tom Ron 742311 2 What if he wants the column to be UNSI
communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start 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 http://askubuntu.com/questions/469847/error-1064-42000-creating-table-mysql this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question _ Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can error 1064 answer The best answers are voted up and rise to the top ERROR 1064 (42000) creating table MySQL up vote 0 down vote favorite I try to build my own website, and at my website I ask people to enter their name and write a little story. When they are done, they hit submit, and it sends the information to my database. I work with error 1064 42000 MySQL, and I want to create a table where I can store the information in. This is my MySQL code:+ CREATE TABLE names ( name PRIMARY KEY NOT NULL, message NOT NULL, IPv4 NOT NULL, browser NOT NULL, date NOT NULL, time NOT NULL, ); But when I enter this in my command prompt, it says:ERROR 1064 (42000): 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 'PRIMARY KEY NOT NULL, message NOT NULL, IPv4 NOT NULL, browser NOT NULL, date NO' at line 1Can you tell me what I did wrong and how to fix this? I don't know if it's helpful, but I've encluded my PHP script too. It can be a little messy with names because I had to translate the variables to English. My PHP code is (I created it before I created the table, and as you see I did manage to set up my database 'names', also I want to call my table 'names'):
$name = $_POST['name']; $message = $_POST['message']; $user = 'user'; $password = 'Login'; $host = 'localhost:3036'; $browser = $_SERVER['HTTP_USER_AG