Re: mysqldump error 1064 for database Use command
Hi win.a, I tried with another user the problem still persists. I am getting same error for another user as well. -- Regards, Manasi Save On Tue, 7 Sep 2010 11:41:35 0800, win.a wrote: use another user and dump the data ,eg the root . mysqldump -uroot -p --al-databases AllNew_Databases_20100904.sql All you best What we are struggling for ? The life or the life ? On Mon, Sep 6, 2010 at 8:33 PM, Manasi Save manasi.s...@artificialmachines.com wrote: Hi win.a, How am I suppose put that command. Could you help me with the syntax: If I am giving it this way:- mysqldump --all-databases AllNew_Databases_20100904.sql then it says it will not work with my system user. nor with this it is working :- mysqldump -u --all-databases AllNew_Databases_20100904.sql -- Regards, Manasi Save On Mon, 6 Sep 2010 20:12:26 0800, win.a wrote: try it without username and password in command line,type it it prompts. All you best What we are struggling for ? The life or the life ? On Mon, Sep 6, 2010 at 3:28 PM, Manasi Save manasi.s...@artificialmachines.com wrote: No it does not. But when I dump database name mydb it does. but not the database with name 1. -- Regards, Manasi Save On Mon, 06 Sep 2010 09:23:21 0200, Jangita wrote: On 06/09/2010 6:54 a, Manasi Save wrote: Dear Nitin, I have newly installed mysql on this server. mysql Select version(); - | version() | - | 5.1.22-rc-Debian_2~ppa5-log | - Earlier I use to run the same command on Fedora-with same mysql version. I could not possibly change the database name. There are quite a few databases I have on the system. -- Regards, Manasi Save Does it work when you dump only the database `1`? -- Jangita | 256 76 91 8383 | Y! MSN: jang...@yahoo.com Skype: jangita | GTalk: jangita.nyag...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=manasi.s...@artificialmachines.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=win@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: mysqldump error 1064 for database Use command
I'm not sure but you might try with sql_mode set to ANSI. Otherwise try the dump remotely from a Linux box. Regards, Nitin From: Manasi Save manasi.s...@artificialmachines.com To: win.a win@gmail.com Cc: mysql@lists.mysql.com mysql@lists.mysql.com Sent: Wed, September 8, 2010 3:57:40 PM Subject: Re: mysqldump error 1064 for database Use command Hi win.a, I tried with another user the problem still persists. I am getting same error for another user as well. -- Regards, Manasi Save On Tue, 7 Sep 2010 11:41:35 0800, win.a wrote: use another user and dump the data ,eg the root . mysqldump -uroot -p --al-databases AllNew_Databases_20100904.sql All you best What we are struggling for ? The life or the life ? On Mon, Sep 6, 2010 at 8:33 PM, Manasi Save manasi.s...@artificialmachines.com wrote: Hi win.a, How am I suppose put that command. Could you help me with the syntax: If I am giving it this way:- mysqldump --all-databases AllNew_Databases_20100904.sql then it says it will not work with my system user. nor with this it is working :- mysqldump -u --all-databases AllNew_Databases_20100904.sql -- Regards, Manasi Save On Mon, 6 Sep 2010 20:12:26 0800, win.a wrote: try it without username and password in command line,type it it prompts. All you best What we are struggling for ? The life or the life ? On Mon, Sep 6, 2010 at 3:28 PM, Manasi Save manasi.s...@artificialmachines.com wrote: No it does not. But when I dump database name mydb it does. but not the database with name 1. -- Regards, Manasi Save On Mon, 06 Sep 2010 09:23:21 0200, Jangita wrote: On 06/09/2010 6:54 a, Manasi Save wrote: Dear Nitin, I have newly installed mysql on this server. mysql Select version(); - | version() | - | 5.1.22-rc-Debian_2~ppa5-log | - Earlier I use to run the same command on Fedora-with same mysql version. I could not possibly change the database name. There are quite a few databases I have on the system. -- Regards, Manasi Save Does it work when you dump only the database `1`? -- Jangita | 256 76 91 8383 | Y! MSN: jang...@yahoo.com Skype: jangita | GTalk: jangita.nyag...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=manasi.s...@artificialmachines.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=win@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=ntn...@yahoo.com
Re: mysqldump error 1064 for database Use command
On 06/09/2010 6:54 a, Manasi Save wrote: Dear Nitin, I have newly installed mysql on this server. mysql Select version(); +-+ | version() | +-+ | 5.1.22-rc-Debian_2~ppa5-log | +-+ Earlier I use to run the same command on Fedora-with same mysql version. I could not possibly change the database name. There are quite a few databases I have on the system. -- Regards, Manasi Save Does it work when you dump only the database `1`? -- Jangita | +256 76 91 8383 | Y! MSN: jang...@yahoo.com Skype: jangita | GTalk: jangita.nyag...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: mysqldump error 1064 for database Use command
No it does not. But when I dump database name mydb it does. but not the database with name 1. -- Regards, Manasi Save On Mon, 06 Sep 2010 09:23:21 0200, Jangita wrote: On 06/09/2010 6:54 a, Manasi Save wrote: Dear Nitin, I have newly installed mysql on this server. mysql Select version(); - | version() | - | 5.1.22-rc-Debian_2~ppa5-log | - Earlier I use to run the same command on Fedora-with same mysql version. I could not possibly change the database name. There are quite a few databases I have on the system. -- Regards, Manasi Save Does it work when you dump only the database `1`? -- Jangita | 256 76 91 8383 | Y! MSN: jang...@yahoo.com Skype: jangita | GTalk: jangita.nyag...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=manasi.s...@artificialmachines.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: mysqldump error 1064 for database Use command
Dear Nitin, I have newly installed mysql on this server. mysql Select version(); +-+ | version() | +-+ | 5.1.22-rc-Debian_2~ppa5-log | +-+ Earlier I use to run the same command on Fedora-with same mysql version. I could not possibly change the database name. There are quite a few databases I have on the system. --Regards, Manasi Save On Sat, 4 Sep 2010 21:00:22 -0700 (PDT), Nitin Mehta wrote: Hi, Have you recently upgraded your MySQL installation? 1064 in earlier days used to mean use of reserved word. Few clients have reported this error in last couple of months after they upgraded from 5.1.41 to higher versions. As of now, I don't have a solution other than changing the name (of database in your case). Hope that helps. Regards, Nitin From: Manasi Save manasi.s...@artificialmachines.comTo: "mysql@lists.mysql.com" mysql@lists.mysql.comSent: Sat, September 4, 2010 12:06:27 PMSubject: mysqldump error 1064 for database Use commandHi All,I have 10 mysql databases all the tables use MyIsAm mysql storage engine.Database names are 1,2,3,4,...10.When I use mysqldump command with --all-databases option. This gives me following error:mysqldump -u myuser -p --all-databases AllNew_Databases_20100904.sqlERROR MESSAGE :-mysqldump: Couldn't execute 'use 1': 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 '1' at line 1 (1064)Can anyone provide any input on this. I have never got this error before. The backups uptill now was happening properly. Please let me know if I am missing out any information which should be provided to get more clear idea about this error.Any input will be a great help.Thanks in advance.--Regards,Manasi Save
mysqldump error 1064 for database Use command
Hi All, I have 10 mysql databases all the tables use MyIsAm mysql storage engine. Database names are 1,2,3,4,...10. When I use mysqldump command with --all-databases option. This gives me following error: mysqldump -u myuser -p --all-databases AllNew_Databases_20100904.sql ERROR MESSAGE :- mysqldump: Couldn't execute 'use 1': 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 '1' at line 1 (1064) Can anyone provide any input on this. I have never got this error before. The backups uptill now was happening properly. Please let me know if I am missing out any information which should be provided to get more clear idea about this error. Any input will be a great help. Thanks in advance. -- Regards, Manasi Save
Re: mysqldump error 1064 for database Use command
Hi, Have you recently upgraded your MySQL installation? 1064 in earlier days used to mean use of reserved word. Few clients have reported this error in last couple of months after they upgraded from 5.1.41 to higher versions. As of now, I don't have a solution other than changing the name (of database in your case). Hope that helps. Regards, Nitin From: Manasi Save manasi.s...@artificialmachines.com To: mysql@lists.mysql.com mysql@lists.mysql.com Sent: Sat, September 4, 2010 12:06:27 PM Subject: mysqldump error 1064 for database Use command Hi All, I have 10 mysql databases all the tables use MyIsAm mysql storage engine. Database names are 1,2,3,4,...10. When I use mysqldump command with --all-databases option. This gives me following error: mysqldump -u myuser -p --all-databases AllNew_Databases_20100904.sql ERROR MESSAGE :- mysqldump: Couldn't execute 'use 1': 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 '1' at line 1 (1064) Can anyone provide any input on this. I have never got this error before. The backups uptill now was happening properly. Please let me know if I am missing out any information which should be provided to get more clear idea about this error. Any input will be a great help. Thanks in advance. -- Regards, Manasi Save
Error 1064
I am receiving this error: ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to you MySQL server version for the right syntax to use near '16 varchar(255) NOT NULL default 'Not applicable', 17a varch I have version 4.0.16 and have a dump file that I'm trying to recreate into a new database. The following is the table that is trying to be created along with some of the fields: CREATE TABLE assessment_child_psych ( id int(11) NOT NULL auto_increment, form_version smallint(6) NOT NULL default '1', client_id int(11) NOT NULL default '0', assessment_date datetime NOT NULL default '-00-00 00:00:00', user_id int(11) NOT NULL default '0', status varchar(20) NOT NULL default 'Pending', 6a varchar(255) NOT NULL default 'Not applicable', 6b varchar(255) NOT NULL default 'Not applicable', 6c varchar(255) NOT NULL default '', 7a varchar(255) NOT NULL default 'Not applicable', 7b varchar(255) NOT NULL default '', 7c varchar(255) NOT NULL default '', 8a varchar(255) NOT NULL default 'Not applicable', 9a varchar(255) NOT NULL default 'Not applicable', 9 varchar(255) NOT NULL default 'Not applicable', 9b varchar(255) NOT NULL default 'Not applicable', 10a varchar(255) NOT NULL default 'Not applicable', 10 varchar(255) NOT NULL default 'Not applicable', 10b varchar(255) NOT NULL default '', 10_describe varchar(255) NOT NULL default '', 11a varchar(255) NOT NULL default 'Not applicable', 11b varchar(255) NOT NULL default '', 12a varchar(255) NOT NULL default 'Not applicable', 12b varchar(255) NOT NULL default '', 13a varchar(255) NOT NULL default 'Not applicable', 13b varchar(255) NOT NULL default '', 13b_other varchar(255) NOT NULL default '', 14a varchar(255) NOT NULL default 'Not applicable', 14b varchar(255) NOT NULL default '', 14c varchar(100) NOT NULL default 'Not applicable', 14cexplain varchar(255) NOT NULL default '', 15a varchar(255) NOT NULL default 'Not applicable', 15b varchar(255) NOT NULL default '', 16 varchar(255) NOT NULL default 'Not applicable', 17a varchar(255) NOT NULL default 'Not applicable', 17b varchar(255) NOT NULL default '', Any line beginning with just a number (ie 9, 10, 16) causes a failure. What am I missing? _ Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1
Re: Error 1064
Hi Brad, 2010/6/8 Brad Scott outlawsco...@hotmail.com: [...] Any line beginning with just a number (ie 9, 10, 16) causes a failure. What am I missing? you should add backticks ( ` ) at both ends of the column name, e.g. `7c` varchar(255) NOT NULL default '', I think your export should have been done with the option --quote-names enabled. Hope this helps, unfortunately I have no mysql instances available to test at the moment... Greetings, Mattia. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Error 1064
Brad Scott skrev: Any line beginning with just a number (ie 9, 10, 16) causes a failure. What am I missing? backticks. Use `9`, `10`, etc. Having column names that begin with numbers is a really bad design decision. 9a123 (unquoted, of course) will work, as you've noticed, but e.g. 0x123 is going to give you a nasty surprise. / Carsten -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Error 1064 on a basic UPDATE query
Hi List, We have a transactions table (~600k records). I'm trying a simple update query, it fails. I thought this could be due to a reserved word problem, but all names have been escaped. mysql UPDATE `tblTransaction` SET `TYPE` = 'Manual' WHERE (`ORDERID` = '694215576aac60f10c9eebe4a5a39d0f'); 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 'UPDATE `tblTransaction` SET `TYPE` = 'Manual' WHERE (`ORDERID` = '694215576aac60' at line 1 If anybody has any ideas, please let me know :) Thanks, James -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Error 1064 on a basic UPDATE query
Hi, James Graham wrote: Hi List, We have a transactions table (~600k records). I'm trying a simple update query, it fails. I thought this could be due to a reserved word problem, but all names have been escaped. mysql UPDATE `tblTransaction` SET `TYPE` = 'Manual' WHERE (`ORDERID` = '694215576aac60f10c9eebe4a5a39d0f'); 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 'UPDATE `tblTransaction` SET `TYPE` = 'Manual' WHERE (`ORDERID` = '694215576aac60' at line 1 If anybody has any ideas, please let me know :) Not a clue. Is there a funny character that only looks like a space, or something of that nature? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
First essay - ERROR 1064
Hello ! I'm a beginner with mysql. I just installed the phpMyAdmin 2.9.1.1-Debian-1 / mysql 14.12 Distrib 5.0.30 for a soft (koha), but I have an error when I try to install the base : Creating the MySQL database for Koha... 0 ERROR 1064 (42000) at line 772: 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 'return char(4) default NULL, renewals tinyint(4) default NULL, timestamp tim' at line 9 Can't locate XML/Simple.pm in @INC (@INC contains: /usr/local/koha/intranet/modules /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 .) at /usr/local/koha/intranet/modules/C4/Context.pm line 23. BEGIN failed--compilation aborted at /usr/local/koha/intranet/modules/C4/Context.pm line 23. Compilation failed in require at scripts/updater/updatedatabase line 21. BEGIN failed--compilation aborted at scripts/updater/updatedatabase line 21. Problem updating database... Is the problem from mysql ? Thanks for help, Thibaud. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
First essay : error 1064
Hi ! I'm a beginner with mysql. I just installed the phpMyAdmin 2.9.1.1-Debian-1 / mysql 14.12 Distrib 5.0.30 for a soft (koha), but I have an error when I try to install the base : Creating the MySQL database for Koha... 0 ERROR 1064 (42000) at line 772: 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 'return char(4) default NULL, renewals tinyint(4) default NULL, timestamp tim' at line 9 Can't locate XML/Simple.pm in @INC (@INC contains: /usr/local/koha/intranet/modules /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 .) at /usr/local/koha/intranet/modules/C4/Context.pm line 23. BEGIN failed--compilation aborted at /usr/local/koha/intranet/modules/C4/Context.pm line 23. Compilation failed in require at scripts/updater/updatedatabase line 21. BEGIN failed--compilation aborted at scripts/updater/updatedatabase line 21. Problem updating database... Is the problem from mysql ? Thanks for help, Thibaud. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Error 1064 when importing 4.0 dump into 4.1 via command line
I dumped a database from a 4.0 mysql and am attempting to move it to a server running 4.1 - using the command line: $ mysql -u root -pmypassword empty4.1db 4.0dump.sql The result: ERROR 1064 (42000) at line 2: 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 '77, 137289, 4)' at line 1 When I look at the file using vi, I see lots of ^M (all over the place). I believe that these are DOS line breaks and I know how to get rid of them, but it is a 35MB file and I don't know if I can do it over my slow connection from home (via SSH). My question is: are those ^Ms my problem? Or is that normal and I have some other issue? Thanks in advance for any pointers.
Re: Error 1064 when importing 4.0 dump into 4.1 via command line
I dont think that is the problem but, what do you mean by a slow connection ?, you cant run the dos2unix command on the remote server ? The error ocurred on line 2, did you see any special word in that line ? can you share with us that line? , remember that each version may can reserve different words. Carlos On 9/26/06, Curious George [EMAIL PROTECTED] wrote: I dumped a database from a 4.0 mysql and am attempting to move it to a server running 4.1 - using the command line: $ mysql -u root -pmypassword empty4.1db 4.0dump.sql The result: ERROR 1064 (42000) at line 2: 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 '77, 137289, 4)' at line 1 When I look at the file using vi, I see lots of ^M (all over the place). I believe that these are DOS line breaks and I know how to get rid of them, but it is a 35MB file and I don't know if I can do it over my slow connection from home (via SSH). My question is: are those ^Ms my problem? Or is that normal and I have some other issue? Thanks in advance for any pointers. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
ERROR 1064 (42000): You have an error in your SQL syntax;
Hi All, gee I really hate bugging you all for this. I looked at this page, http://dev.mysql.com/doc/refman/5.0/en/alter-table.html which has this, To change column |a| from |INTEGER| to |TINYINT NOT NULL| (leaving the name the same), and to change column |b| from |CHAR(10)| to |CHAR(20)| as well as renaming it from |b| to |c|: ALTER TABLE t2 MODIFY a TINYINT NOT NULL, CHANGE b c CHAR(20); for changing the name of a column, right? So, why doesn't the below work? mysql ALTER TABLE actors CHANGE director_id actor_id; I get this, 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 '' at line 1 Sorry, little confused right about now, eh. Cheers. Mark Sargent. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: ERROR 1064 (42000): You have an error in your SQL syntax;
At 0:09 +1000 8/6/06, Mark Sargent wrote: ALTER TABLE t2 MODIFY a TINYINT NOT NULL, CHANGE b c CHAR(20); for changing the name of a column, right? So, why doesn't the below work? mysql ALTER TABLE actors CHANGE director_id actor_id; I'm no great expert myself, but off the top of my head, maybe you need to specify the type even if it's unchanged (I assume all you want to do is rename the column?). So supposing director_id was a SMALLINT(3) UNSIGNED, try: ALTER TABLE actors CHANGE director_id actor_id SMALLINT(3) UNSIGNED; Any good? -- Cheers... Chris Highway 57 Web Development -- http://highway57.co.uk/ If at first you don't succeed, try, try again. Then quit. No use being a damn fool about it. -- W.C. Fields -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
re: ERROR 1064 (42000): You have an error in your SQL syntax;
Mark, With the CHANGE clause of ALTER TABLE statement, you must provide the column definition, so something like this is what you need: ALTER TABLE actors CHANGE director_id actor_id MEDIUMINT UNSIGNED NOT NULL; or whatever your original definition is. AFAIK there is no way to rename a column without giving the column type. --Rob Hi All, gee I really hate bugging you all for this. I looked at this page, http://dev.mysql.com/doc/refman/5.0/en/alter-table.html which has this, To change column |a| from |INTEGER| to |TINYINT NOT NULL| (leaving the name the same), and to change column |b| from |CHAR(10)| to |CHAR(20)| as well as renaming it from |b| to |c|: ALTER TABLE t2 MODIFY a TINYINT NOT NULL, CHANGE b c CHAR(20); for changing the name of a column, right? So, why doesn't the below work? mysql ALTER TABLE actors CHANGE director_id actor_id; I get this, 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 '' at line 1 Sorry, little confused right about now, eh. Cheers. Mark Sargent. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ -- Original Message -- FROM: Mark Sargent [EMAIL PROTECTED] TO:mysql@lists.mysql.com DATE: Thu, 08 Jun 2006 00:09:45 +1000 SUBJECT: ERROR 1064 (42000): You have an error in your SQL syntax; Hi All, gee I really hate bugging you all for this. I looked at this page, http://dev.mysql.com/doc/refman/5.0/en/alter-table.html which has this, To change column |a| from |INTEGER| to |TINYINT NOT NULL| (leaving the name the same), and to change column |b| from |CHAR(10)| to |CHAR(20)| as well as renaming it from |b| to |c|: ALTER TABLE t2 MODIFY a TINYINT NOT NULL, CHANGE b c CHAR(20); for changing the name of a column, right? So, why doesn't the below work? mysql ALTER TABLE actors CHANGE director_id actor_id; I get this, 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 '' at line 1 Sorry, little confused right about now, eh. Cheers. Mark Sargent. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: ERROR 1064 (42000): You have an error in your SQL syntax;
You can't just change the name without changing (or stating) the type. ALTER TABLE actors CHANGE director_id actos_id varchar(96) default NULL; J.R. -Original Message- From: Mark Sargent [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 07, 2006 10:10 AM To: mysql@lists.mysql.com Subject: ERROR 1064 (42000): You have an error in your SQL syntax; Hi All, gee I really hate bugging you all for this. I looked at this page, http://dev.mysql.com/doc/refman/5.0/en/alter-table.html which has this, To change column |a| from |INTEGER| to |TINYINT NOT NULL| (leaving the name the same), and to change column |b| from |CHAR(10)| to |CHAR(20)| as well as renaming it from |b| to |c|: ALTER TABLE t2 MODIFY a TINYINT NOT NULL, CHANGE b c CHAR(20); for changing the name of a column, right? So, why doesn't the below work? mysql ALTER TABLE actors CHANGE director_id actor_id; I get this, 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 '' at line 1 Sorry, little confused right about now, eh. Cheers. Mark Sargent. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
re: ERROR 1064 (42000): You have an error in your SQL syntax;
At 15:19 +0100 7/6/06, Rob Desbois wrote: With the CHANGE clause of ALTER TABLE statement, you must provide the column definition, so something like this is what you need: ALTER TABLE actors CHANGE director_id actor_id MEDIUMINT UNSIGNED NOT NULL; or whatever your original definition is. Wow! I was right. I'm learning... :-) -- Cheers... Chris Highway 57 Web Development -- http://highway57.co.uk/ If at first you don't succeed, try, try again. Then quit. No use being a damn fool about it. -- W.C. Fields -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Error 1064: update .....select nested.
update TABLE1 a, TABLE2 b set a.FIELD1=b.FIELD2 where column2='[EMAIL PROTECTED]' And column1 = '[EMAIL PROTECTED]' Or: update TABLE1 a, TABLE2 b set a.FIELD1=b.FIELD2 where b.column2=a.column1 And column1 = '[EMAIL PROTECTED]' Regards! -Mensaje original- De: Truong Tan Son [mailto:[EMAIL PROTECTED] Enviado el: Miércoles, 15 de Marzo de 2006 07:22 p.m. Para: mysql@lists.mysql.com Asunto: Error 1064: update .select nested. Dear Sir, MySQL-4.1.12 on RedHat Linux EL4: mysql update TABLE1 set FIELD1=(select FIELD2 from TABLE2 where mysql COLUMN2= '[EMAIL PROTECTED]') where COLUMN1='[EMAIL PROTECTED]'; ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp onds to your MySQL server version for the right syntax to use near 'select FIELD2 from TABLE2 where COLUMN2='[EMAIL PROTECTED] mysql For MySQL -5.0.18 is Ok Syntax error for version 4.1.12 ? Thanks you and best regards, -- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Error 1064: update .....select nested.
AAAUUUGGGHHH!!! You used the dreaded comma separated list !!! ;-) A more explicit way to write the same thing posted by Sr. Cruz... update TABLE1 a INNER JOIN TABLE2 b on a.id = b.other_id set a.FIELD1=b.FIELD2 WHERE a.column1='literal'; Actually posting a real query (instead of a cleansed column1...column2 query) would have resulted in you getting better answers. Shawn Green Database Administrator Unimin Corporation - Spruce Pine Ing. Edwin Cruz [EMAIL PROTECTED] wrote on 03/16/2006 10:24:05 AM: update TABLE1 a, TABLE2 b set a.FIELD1=b.FIELD2 where column2='[EMAIL PROTECTED]' And column1 = '[EMAIL PROTECTED]' Or: update TABLE1 a, TABLE2 b set a.FIELD1=b.FIELD2 where b.column2=a.column1 And column1 = '[EMAIL PROTECTED]' Regards! -Mensaje original- De: Truong Tan Son [mailto:[EMAIL PROTECTED] Enviado el: Miércoles, 15 de Marzo de 2006 07:22 p.m. Para: mysql@lists.mysql.com Asunto: Error 1064: update .select nested. Dear Sir, MySQL-4.1.12 on RedHat Linux EL4: mysql update TABLE1 set FIELD1=(select FIELD2 from TABLE2 where mysql COLUMN2= '[EMAIL PROTECTED]') where COLUMN1='[EMAIL PROTECTED]'; ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp onds to your MySQL server version for the right syntax to use near 'select FIELD2 from TABLE2 where COLUMN2='[EMAIL PROTECTED] mysql For MySQL -5.0.18 is Ok Syntax error for version 4.1.12 ? Thanks you and best regards, -- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
(SOLVED) Re: Error 1064: update .....select nested.
Dear Sir, All solutions is very good ! update TABLE1 a INNER JOIN TABLE2 b on a.id = b.other_id set a.FIELD1=b.FIELD2 WHERE a.column1='literal'; Or update TABLE1 a, TABLE2 b set a.FIELD1=b.FIELD2 where column2='[EMAIL PROTECTED]' And column1 = '[EMAIL PROTECTED]' Or update TABLE1 a, TABLE2 b set a.FIELD1=b.FIELD2 where b.column2=a.column1 And column1 = '[EMAIL PROTECTED]' Thanks you very much. - Original Message - From: [EMAIL PROTECTED] To: Ing. Edwin Cruz [EMAIL PROTECTED] Cc: mysql@lists.mysql.com; 'Truong Tan Son' [EMAIL PROTECTED] Sent: Thursday, March 16, 2006 10:51 PM Subject: RE: Error 1064: update .select nested. AAAUUUGGGHHH!!! You used the dreaded comma separated list !!! ;-) A more explicit way to write the same thing posted by Sr. Cruz... update TABLE1 a INNER JOIN TABLE2 b on a.id = b.other_id set a.FIELD1=b.FIELD2 WHERE a.column1='literal'; Actually posting a real query (instead of a cleansed column1...column2 query) would have resulted in you getting better answers. Shawn Green Database Administrator Unimin Corporation - Spruce Pine Ing. Edwin Cruz [EMAIL PROTECTED] wrote on 03/16/2006 10:24:05 AM: update TABLE1 a, TABLE2 b set a.FIELD1=b.FIELD2 where column2='[EMAIL PROTECTED]' And column1 = '[EMAIL PROTECTED]' Or: update TABLE1 a, TABLE2 b set a.FIELD1=b.FIELD2 where b.column2=a.column1 And column1 = '[EMAIL PROTECTED]' Regards! -Mensaje original- De: Truong Tan Son [mailto:[EMAIL PROTECTED] Enviado el: Miércoles, 15 de Marzo de 2006 07:22 p.m. Para: mysql@lists.mysql.com Asunto: Error 1064: update .select nested. Dear Sir, MySQL-4.1.12 on RedHat Linux EL4: mysql update TABLE1 set FIELD1=(select FIELD2 from TABLE2 where mysql COLUMN2= '[EMAIL PROTECTED]') where COLUMN1='[EMAIL PROTECTED]'; ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp onds to your MySQL server version for the right syntax to use near 'select FIELD2 from TABLE2 where COLUMN2='[EMAIL PROTECTED] mysql For MySQL -5.0.18 is Ok Syntax error for version 4.1.12 ? Thanks you and best regards, -- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Error 1064: update .....select nested.
Dear Sir, MySQL-4.1.12 on RedHat Linux EL4: mysql update TABLE1 set FIELD1=(select FIELD2 from TABLE2 where COLUMN2= '[EMAIL PROTECTED]') where COLUMN1='[EMAIL PROTECTED]'; ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp onds to your MySQL server version for the right syntax to use near 'select FIELD2 from TABLE2 where COLUMN2='[EMAIL PROTECTED] mysql For MySQL -5.0.18 is Ok Syntax error for version 4.1.12 ? Thanks you and best regards, -- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
error 1064 after upgrade to 5.0 from 4.1
Sorry I should have said. I get error 1064 whenever I am working with an integer or real column. char's are fine. Kerry Can someone help me. I was running v4.1 and just upgraded the version to v5.0. Most of my tables are MyISAM with some InnoDb. Most of the MyISAM tables are char fields but a few have integer columns. When trying to create a new table using the Administrator 1.1 program it is fine creating columns which are of type char but it fails when creating a column of type integer. The error message is ALTER TABLE `filos`.`settings` MODIFY COLUMN `IntVal` INTEGER CHARACTER SET latin1 COLLATE latin1_general_ci; Can someone advise me what has changed in the upgrade and how I can get back to using integers? kERRY -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: error 1064 when trying to create table
Hello. FOREIGN KEY (A_areaNum) REFERENCES Area(areaNum), Put Area in backticks ('`'). See: http://dev.mysql.com/doc/refman/5.0/en/legal-names.html Nabegh Al-Thalji wrote: When I execute the following query CREATE TABLE Sponsor ( sNum INTEGER UNSIGNED NOT NULL, sAdrBlock CHAR(2), sCivil_ID CHAR(12), sDateOfBirth DATE, sDrvLicenseExp DATE, sDrvLicenseNum CHAR(9), sGender ENUM('M','F'), sName VARCHAR(20), sStatus VARCHAR(20), sTelephone CHAR(7), A_areaNum INTEGER UNSIGNED NOT NULL, G_goverNum INTEGER UNSIGNED NOT NULL, O_occupNum INTEGER UNSIGNED NOT NULL, N_nationNum INTEGER UNSIGNED NOT NULL, PRIMARY KEY (sNum), FOREIGN KEY (A_areaNum) REFERENCES Area(areaNum), FOREIGN KEY (G_goverNum) REFERENCES Governate(goverNum), FOREIGN KEY (O_occupNum) REFERENCES Occupation(occupNum), FOREIGN KEY (N_nationNum) REFERENCES Nationality(nationNum) ); I get the following error 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 'Area(areaNum), FOREIGN KEY(G_goverNum) REFERENCES Governate(goverNum), at line 17 Any ideas? Thanks -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
error 1064 when trying to create table
When I execute the following query CREATE TABLE Sponsor ( sNum INTEGER UNSIGNED NOT NULL, sAdrBlock CHAR(2), sCivil_ID CHAR(12), sDateOfBirth DATE, sDrvLicenseExp DATE, sDrvLicenseNum CHAR(9), sGender ENUM('M','F'), sName VARCHAR(20), sStatus VARCHAR(20), sTelephone CHAR(7), A_areaNum INTEGER UNSIGNED NOT NULL, G_goverNum INTEGER UNSIGNED NOT NULL, O_occupNum INTEGER UNSIGNED NOT NULL, N_nationNum INTEGER UNSIGNED NOT NULL, PRIMARY KEY (sNum), FOREIGN KEY (A_areaNum) REFERENCES Area(areaNum), FOREIGN KEY (G_goverNum) REFERENCES Governate(goverNum), FOREIGN KEY (O_occupNum) REFERENCES Occupation(occupNum), FOREIGN KEY (N_nationNum) REFERENCES Nationality(nationNum) ); I get the following error 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 'Area(areaNum), FOREIGN KEY(G_goverNum) REFERENCES Governate(goverNum), at line 17 Any ideas? Thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: error 1064 when trying to create table
Hi, You are using a reserved function name AREA (polygon function) as a fieldname. Simply change the field's name or try using quotes around it... Detlev [...] FOREIGN KEY (A_areaNum) REFERENCES Area(areaNum), [...] Any ideas? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
ERROR 1064: You have an error in your SQL syntax....
I am a newbie here. I created a simple table defined as: create table test ( testID int unsigned not null auto_increment, testName varchar(128) not null, primary key (testID) ) type = MyISAM; Now, I filled out test table, and looking for the testName with max characters. The following caused the same error of: 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 'select max(length(testName)) from test)' at line 1 select testName from test where length(testName) = (select max(length(testName)) from test); Then I copied a simple line from MySQL book: select * from president where birth = (select min(birth) from president); and adapted to my table with: select * from test where testName = (select min(testName) from test); and executed it with exactly the same error result. MySQL version I am using is: 4.0.21-standard Please help me why I get this error. Thank you Chuzo -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: ERROR 1064: You have an error in your SQL syntax....
Chuzo, SELECT MAX(LENGTH(...)) FROM ... ought to work. SQL doesn't allow aggregate funcs like MAX() in the WHERE clause. Use HAVING(). For nested queries like SELECT ... WHERE colvalue=(SELECT...) you need version 4.1 or later. Peter Brawley http://www.artfulsoftware.com - Chuzo Okuda wrote: I am a newbie here. I created a simple table defined as: create table test ( testID int unsigned not null auto_increment, testName varchar(128) not null, primary key (testID) ) type = MyISAM; Now, I filled out test table, and looking for the testName with max characters. The following caused the same error of: 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 'select max(length(testName)) from test)' at line 1 select testName from test where length(testName) = (select max(length(testName)) from test); Then I copied a simple line from MySQL book: select * from president where birth = (select min(birth) from president); and adapted to my table with: select * from test where testName = (select min(testName) from test); and executed it with exactly the same error result. MySQL version I am using is: 4.0.21-standard Please help me why I get this error. Thank you Chuzo -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.5 - Release Date: 4/7/2005 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Error 1064: type mismatch
Hello list. I'm new to MySQL but so far I like it a lot. I have it running on WinNT4 w/SP6a and I use MySQL Admin. I'm having trouble running an application from a third party, this application launches but whenever I try a query, I get a message that says Type mismatch for field field name here, expecting:AuntoInc actual: Unknown. We've checked (the developer and I) the table definition and the referred field is an integer with autoinc on, and so it's shown in MySQL Admin. ¿Any ideas? I've googled for an answer but couldn't find it, also red the mysql manual but that didn't do either. Thanks a lot in advance.- -- -= Nicolás Conde - SS.AA.=- -= Facultad de Ingeniería=- -= Universidad de la República =- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Error 1064 in three tables. How do I fix them.
Hi. LIMIT clause does not accept negative values. See: http://dev.mysql.com/doc/mysql/en/SELECT.html Leon Sargent [EMAIL PROTECTED] wrote: Good Morning. I am new to the list and new to Mysql. I am in the process of running a website and I need a little newbie help. In my database I have three tables that I am having problems with and each one has the same error. Here is the 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 '-5, 5' at line 1 select manufacturers_id, manufacturers_name, manufacturers_image, date_added, last_modified from manufacturers order by manufacturers_name limit -5, 5 This is from the Manufacture table. I don't understand how to fix this. To give you some information on how this happened I will explain a little. I have a table that had some manufactures that I no longer use. I went into the admin of my website and delete the five manufactures that were listed. When I deleted the last manufacture I got this error in three separate tables. Can anyone help me? Lee -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Error 1064 in three tables. How do I fix them.
Good Morning. I am new to the list and new to Mysql. I am in the process of running a website and I need a little newbie help. In my database I have three tables that I am having problems with and each one has the same error. Here is the 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 '-5, 5' at line 1 select manufacturers_id, manufacturers_name, manufacturers_image, date_added, last_modified from manufacturers order by manufacturers_name limit -5, 5 This is from the Manufacture table. I don't understand how to fix this. To give you some information on how this happened I will explain a little. I have a table that had some manufactures that I no longer use. I went into the admin of my website and delete the five manufactures that were listed. When I deleted the last manufacture I got this error in three separate tables. Can anyone help me? Lee -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Error 1064 (Syntax error) after adding ENUM or Set types to table definition
I created the dump file from my current DB to make adjustments and also migrate to Innodb tables. In the process I have tried to add some ENUM types in select table. Obviously, I am doing something wrong as each one give me a syntax error 1064 when I try to source in the text file. I've read the manual and do not see where my error is. Can someone point out what is wrong on the below table? Thanks in advance Bob -- MySQL dump 9.10 -- -- Host: bartis-1Database: stingertrdb4 -- -- -- Server version 4.0.18-max-debug -- -- Table structure for table `feature_list` -- DROP TABLE IF EXISTS feature_list; CREATE TABLE feature_list ( Feature varchar(50) default NOT NULL, New ENUM('Y','N') NOT NULL, Owner varchar(50) default NOT NULL, NewFeatureDescription varchar(255) default NOT NULL, DateMod datetime NOT NULL default '-MM-DD HH:MM:SS', PRIMARY KEY Feature (Feature), INDEX Owner (Owner), FOREIGN KEY (Owner) REFERENCES tester_list(Tester) ON UPDATE CASCADE ON DELETE RESTRICT ) TYPE=InnoDB; Robert M. Bartis Lucent Technologies ¢ Room HO 1C-413A (HO) / 1B-304 (WH) ( 732.949.4565 (HO) / 973.386.7426 (WH) * [EMAIL PROTECTED]
Re: Error 1064 (Syntax error) after adding ENUM or Set types to table definition
One of the tricky things about finding errors is that the error is often earlier than you expect. Mysql points out where it stopped understanding you, but often it's due to something on the line before. That's the case here. There's nothing wrong with your ENUM, but the previous line says you want to set a DEFAULT for column Feature, but you don't provide a value. You need to either provide the default value or drop the word DEFAULT. The same thing applies to columns Owner and NewFeatureDescription. Michael Bartis, Robert M (Bob) wrote: I created the dump file from my current DB to make adjustments and also migrate to Innodb tables. In the process I have tried to add some ENUM types in select table. Obviously, I am doing something wrong as each one give me a syntax error 1064 when I try to source in the text file. I've read the manual and do not see where my error is. Can someone point out what is wrong on the below table? Thanks in advance Bob -- MySQL dump 9.10 -- -- Host: bartis-1Database: stingertrdb4 -- -- -- Server version 4.0.18-max-debug -- -- Table structure for table `feature_list` -- DROP TABLE IF EXISTS feature_list; CREATE TABLE feature_list ( Feature varchar(50) default NOT NULL, New ENUM('Y','N') NOT NULL, Owner varchar(50) default NOT NULL, NewFeatureDescription varchar(255) default NOT NULL, DateMod datetime NOT NULL default '-MM-DD HH:MM:SS', PRIMARY KEY Feature (Feature), INDEX Owner (Owner), FOREIGN KEY (Owner) REFERENCES tester_list(Tester) ON UPDATE CASCADE ON DELETE RESTRICT ) TYPE=InnoDB; Robert M. Bartis Lucent Technologies ¢ Room HO 1C-413A (HO) / 1B-304 (WH) ( 732.949.4565 (HO) / 973.386.7426 (WH) * [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
ERROR 1064?
Hi, I am comparable new to mySQL, so sorry if I might bother you with a newby Problem: When I connect to the database via phpMyAdmin or via the mySQL Command Line Tool as root I have problems creating a view (root has all privelegs, and the pure select statement works fine in the line before): the statement create view test as select Name from user; brings the german error message: #1064 - Fehler in der Syntax bei 'view test AS SELECT Name FROM user' in Zeile 1. in english at about: #1064 - Error with the syntax at 'view test AS SELECT Name FROM user' in row 1. OK, this might be a syntax-error, but what is wrong on this syntax??? The select statement works I have checked the create view a thousand times. Thank you very much in advance Klaus -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: ERROR 1064?
Klaus Neudecker [EMAIL PROTECTED] wrote: Hi, I am comparable new to mySQL, so sorry if I might bother you with a newby Problem: When I connect to the database via phpMyAdmin or via the mySQL Command Line Tool as root I have problems creating a view (root has all privelegs, and the pure select statement works fine in the line before): the statement create view test as select Name from user; brings the german error message: #1064 - Fehler in der Syntax bei 'view test AS SELECT Name FROM user' in Zeile 1. in english at about: #1064 - Error with the syntax at 'view test AS SELECT Name FROM user' in row 1. OK, this might be a syntax-error, but what is wrong on this syntax??? The select statement works I have checked the create view a thousand times. MySQL doesn't support VIEWs yet. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Create table 'LIKE' ....Error 1064
Hello All, I have MySQL 4.0.16 on Windows 2000 pro. I am trying to create a table in an existing database. according to the manual, I can use one of these statements: 6.5.3 CREATE TABLE Syntax CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name [(create_definition,...)] [table_options] [select_statement] or CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name [(] LIKE old_tbl_name [)]; I am trying to use the second option. I have a table students and i want to create another table students2 using the 'LIKE' students. Here are the results: mysql CREATE TABLE students2 LIKE students; 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 'LIKE students' at line 1 mysql CREATE TABLE students2 (LIKE students); 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 'LIKE students)' at line 1 1064 is ER_PARSE_ERROR I tried all the tricks i know to no avail. I really don't see the error in this simple command,!!!. Any help would be appricated. Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam
Re: Create table 'LIKE' ....Error 1064
At 7:48 -0800 3/28/04, Khashan wrote: Hello All, I have MySQL 4.0.16 on Windows 2000 pro. I am trying to create a table in an existing database. according to the manual, I can use one of these statements: 6.5.3 CREATE TABLE Syntax CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name [(create_definition,...)] [table_options] [select_statement] or CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name [(] LIKE old_tbl_name [)]; I am trying to use the second option. I have a table students and i want to create another table students2 using the 'LIKE' students. Here are the results: mysql CREATE TABLE students2 LIKE students; 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 'LIKE students' at line 1 mysql CREATE TABLE students2 (LIKE students); 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 'LIKE students)' at line 1 1064 is ER_PARSE_ERROR I tried all the tricks i know to no avail. I really don't see the error in this simple command,!!!. Any help would be appricated. Farther down the manual page: In MySQL 4.1, you can also use LIKE to create a table based on the definition of another table, including any column attributes and indexes the original table has: CREATE TABLE new_tbl LIKE orig_tbl; So you need 4.1 for this to work. -- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB, www.mysql.com MySQL Users Conference: April 14-16, 2004 http://www.mysql.com/uc2004/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Error 1064 in Access95
I am converting an Access95 DB to mySQL. The interface will remain in Access95. I encountered a problem with one of the existing queries. The code for the query is: SELECT DISTINCTROW ManualChecksPrinted.AccountNum, ManualChecksPrinted.CheckNumber, ManualChecksPrinted.AccountID, ManualChecksPrinted.PayeeID, ManualChecksPrinted.CheckPayee, ManualChecksPrinted.CheckDate, ManualChecksPrinted.CheckAmount FROM ManualChecksPrinted WHERE (((ManualChecksPrinted.AccountNum) In (SELECT [AccountNum] FROM [ManualChecksPrinted] As Tmp GROUP BY [AccountNum],[CheckNumber] HAVING Count(*)1 And [CheckNumber] = [ManualChecksPrinted].[CheckNumber]))) ORDER BY ManualChecksPrinted.AccountNum, ManualChecksPrinted.CheckNumber; The problem is in the WHERE clause. I get the ODBC--call failed message box, and the following: [MySQL][ODBC 3.51 Driver][mysqld-4.0.17-nt]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 '(SELECT `MS2`.`AccountNum` FROM `manualchecksprinted` `MS2` GR (#1064) I am a newbie to MySQL so all help is greatly appreciated. If more information is required, please let me know. Keith Hill [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Error 1064 in Access95
Hill, Keith wrote: I am converting an Access95 DB to mySQL. The interface will remain in Access95. I encountered a problem with one of the existing queries. The code for the query is: SELECT DISTINCTROW ManualChecksPrinted.AccountNum, ManualChecksPrinted.CheckNumber, ManualChecksPrinted.AccountID, ManualChecksPrinted.PayeeID, ManualChecksPrinted.CheckPayee, ManualChecksPrinted.CheckDate, ManualChecksPrinted.CheckAmount FROM ManualChecksPrinted WHERE (((ManualChecksPrinted.AccountNum) In (SELECT [AccountNum] FROM [ManualChecksPrinted] As Tmp GROUP BY [AccountNum],[CheckNumber] HAVING Count(*)1 And [CheckNumber] = [ManualChecksPrinted].[CheckNumber]))) ORDER BY ManualChecksPrinted.AccountNum, ManualChecksPrinted.CheckNumber; The problem is in the WHERE clause. I get the ODBC--call failed message box, and the following: [MySQL][ODBC 3.51 Driver][mysqld-4.0.17-nt]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 '(SELECT `MS2`.`AccountNum` FROM `manualchecksprinted` `MS2` GR (#1064) I am a newbie to MySQL so all help is greatly appreciated. If more information is required, please let me know. Keith Hill [EMAIL PROTECTED] You're using a subquery, which Access is passing through to MySQL. MySQL-4.0.17 doesn't support subqueries - only version 4.1.x and higher do. Make another query, put the stuff in the subquery in it - that's the bit that says: in ( select ) Save it, and then join it to your original query. Dan -- signature Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Error 1064 in native function (?)
Hello, i´m using the 3.23.57 version and i´ve declared a native function, but when i call it (SELECT GETUPDATE(1);) i get this line ERROR 1064: You have an error in you SQL syntax near '(1)' at line 1; I think i´ve followed all the steps right: 1)added the line in lex.h {GETUPDATE ...) 2)added this line to item_create.h Item *create_func_getupdate(Item* a); 3)added this definition to item_create.cc Item *create_func_getupdate(Item* a){ return new Item_func_getupdate(a);} 4)added this to item_func.h class Item_func_getupdate :public Item_num_func { public: Item_func_getupdate(Item *a) :Item_num_func(a) {} const char *func_name() const { return getupdate; } double val(); longlong val_int(); enum Item_result result_type () const { return INT_RESULT; } void fix_length_and_dec() { decimals=0; max_length=21; } }; 5) and at last added this to item_func.cc longlong Item_func_getupdate::val_int() { FILE *fic; fic = fopen(gus.txt,w); fprintf(fic,Ejecucion \n); fclose(fic); return 0; } as you may see it´s a simple program which the only thing it has to do it´s printing that line (in the future it will do more things, but until then...). I really need help because this is getting on my nerves! Anyways, thank you very much! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Error 1064 in native function (?)
Hi! On Sep 08, Gustavo Castro wrote: Hello, i?m using the 3.23.57 version and i?ve declared a native function, but when i call it (SELECT GETUPDATE(1);) i get this line ERROR 1064: You have an error in you SQL syntax near '(1)' at line 1; I think i?ve followed all the steps right: 1)added the line in lex.h {GETUPDATE ...) What did you add to lex.h, exactly ? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] Btw, you may ask these questions on [EMAIL PROTECTED], instead of general mysql list. Regards, Sergei -- __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Sergei Golubchik [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Senior Software Developer /_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Error 1064 in native function (?)
ups, i knew i had to copy that line properly. what i added to the lex.h was this { GETUPDATE,SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_getupdate)} i copied the line from the abs function. in fact, as you may see, all my function is nothing but a copy of the abs function with little modifications. - Original Message - From: Sergei Golubchik [EMAIL PROTECTED] To: Gustavo Castro [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; Fortuno, Adam [EMAIL PROTECTED] Sent: Monday, September 08, 2003 10:30 PM Subject: Re: Error 1064 in native function (?) Hi! On Sep 08, Gustavo Castro wrote: Hello, i?m using the 3.23.57 version and i?ve declared a native function, but when i call it (SELECT GETUPDATE(1);) i get this line ERROR 1064: You have an error in you SQL syntax near '(1)' at line 1; I think i?ve followed all the steps right: 1)added the line in lex.h {GETUPDATE ...) What did you add to lex.h, exactly ? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] Btw, you may ask these questions on [EMAIL PROTECTED], instead of general mysql list. Regards, Sergei -- __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Sergei Golubchik [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Senior Software Developer /_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Error 1064 in native function (?)
ups, i knew i had to copy that line properly. what i added to the lex.h was this { GETUPDATE,SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_getupdate)} i copied the line from the abs function. in fact, as you may see, all my function is nothing but a copy of the abs function with little modifications. - Original Message - From: Sergei Golubchik [EMAIL PROTECTED] To: Gustavo Castro [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; Fortuno, Adam [EMAIL PROTECTED] Sent: Monday, September 08, 2003 10:30 PM Subject: Re: Error 1064 in native function (?) Hi! On Sep 08, Gustavo Castro wrote: Hello, i?m using the 3.23.57 version and i?ve declared a native function, but when i call it (SELECT GETUPDATE(1);) i get this line ERROR 1064: You have an error in you SQL syntax near '(1)' at line 1; I think i?ve followed all the steps right: 1)added the line in lex.h {GETUPDATE ...) What did you add to lex.h, exactly ? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] Btw, you may ask these questions on [EMAIL PROTECTED], instead of general mysql list. Regards, Sergei -- __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Sergei Golubchik [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Senior Software Developer /_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
AW: mutual declarations produce Error 1064
Please notice that INDEX (DNO, DNUMBER), is changed to be INDEX (DNO), And I managed to get another error message, But it still woun't compile. Also manually typing the code gave another result as Piping the company_01.sql file through an input operator Please tell me what could be wrong ? Yours sincerely Morten Gulbrandsen -Ursprüngliche Nachricht- Von: Victoria Reznichenko [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 7. August 2003 13:54 An: [EMAIL PROTECTED] Betreff: Re: mutual declarations produce Error 1064 Morten Gulbrandsen [EMAIL PROTECTED] wrote: USE company; # SHOW INNODB STATUS; DROP TABLE IF EXISTS DEPARTMENT; CREATE TABLE DEPARTMENT ( DNAME VARCHAR(15) NOT NULL, DNUMBER INT NOT NULL, MGRSSN CHAR(9) NOT NULL, MGRSTARTDATEDATE, PRIMARY KEY (DNUMBER), UNIQUE (DNAME), INDEX (MGRSSN), # between employee and department FOREIGN KEY (MGRSSN),# a sort of mutually declaration REFERENCES EMPLOYEE(SSN) # this is declared in employee Remove comma before REFERENCES. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mutual declarations produce Error 1064
Morten Gulbrandsen [EMAIL PROTECTED] wrote: USE company; # SHOW INNODB STATUS; DROP TABLE IF EXISTS DEPARTMENT; CREATE TABLE DEPARTMENT ( DNAME VARCHAR(15) NOT NULL, DNUMBER INT NOT NULL, MGRSSN CHAR(9) NOT NULL, MGRSTARTDATEDATE, PRIMARY KEY (DNUMBER), UNIQUE (DNAME), INDEX (MGRSSN), # between employee and department FOREIGN KEY (MGRSSN),# a sort of mutually declaration REFERENCES EMPLOYEE(SSN) # this is declared in employee Remove comma before REFERENCES. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mutual declarations produce Error 1064
USE company; # SHOW INNODB STATUS; DROP TABLE IF EXISTS DEPARTMENT; CREATE TABLE DEPARTMENT ( DNAME VARCHAR(15) NOT NULL, DNUMBER INT NOT NULL, MGRSSN CHAR(9) NOT NULL, MGRSTARTDATEDATE, PRIMARY KEY (DNUMBER), UNIQUE (DNAME), INDEX (MGRSSN), # between employee and department FOREIGN KEY (MGRSSN),# a sort of mutually declaration REFERENCES EMPLOYEE(SSN) # this is declared in employee )TYPE = INNODB; DROP TABLE IF EXISTS EMPLOYEE; CREATE TABLE EMPLOYEE ( FNAME VARCHAR(15) NOT NULL, MINIT CHAR, LNAME VARCHAR(15) NOT NULL, SSN CHAR(9) NOT NULL, BDATE DATE, ADDRESS VARCHAR(30), SEX CHAR, SALARY DECIMAL(10,2), SUPERSSNCHAR(9), DNO INT NOT NULL, PRIMARY KEY (SSN), INDEX (SUPERSSN, SSN), FOREIGN KEY (SUPERSSN) REFERENCES EMPLOYEE(SSN), INDEX (DNO, DNUMBER), FOREIGN KEY (DNO) REFERENCES DEPARTMENT(DNUMBER) # this is declared in department )TYPE = INNODB; === ERROR 1064 at line 9: You have an error in your SQL syntax. Check the manual th at corresponds to your MySQL server version for the right syntax to use near ' REFERENCES EMPLOYEE(SSN) )TYPE = INNODB' at line 10 Bye In short I have Department Dnumber References employee (ssn) Employee Ssn References department(dnumber) What can be done , please ? Yours sincerely Morten Gulbrandsen -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mutual declarations produce Error 1064
Morten, In your extremely long mail, I think I managed to find your question and removed all other stuff. On Wed, Aug 13, 2003 at 03:18:26PM +0200, Morten Gulbrandsen wrote: mysql mysql # from now on the coding causes trouble mysql mysql ALTER TABLE EMPLOYEE - FOREIGN KEY (SUPERSSN) REFERENCES EMPLOYEE(SSN) - ON DELETE SET NULL - ON UPDATE CASCADE; ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp onds to your MySQL server version for the right syntax to use near 'FOREIGN KEY (SUPERSSN) REFERENCES EMPLOYEE(SSN) ON DELETE SET mysql 6.5.4 ALTER TABLE Syntax ALTER [IGNORE] TABLE tbl_name alter_specification [, alter_specification ...] alter_specification: ADD [COLUMN] create_definition [FIRST | AFTER column_name ] | ADD [COLUMN] (create_definition, create_definition,...) | ADD INDEX [index_name] (index_col_name,...) | ADD PRIMARY KEY (index_col_name,...) | ADD UNIQUE [index_name] (index_col_name,...) | ADD FULLTEXT [index_name] (index_col_name,...) | ADD [CONSTRAINT symbol] FOREIGN KEY [index_name] (index_col_name,...) [reference_definition] | ALTER [COLUMN] col_name {SET DEFAULT literal | DROP DEFAULT} | CHANGE [COLUMN] old_col_name create_definition [FIRST | AFTER column_name] | MODIFY [COLUMN] create_definition [FIRST | AFTER column_name] | DROP [COLUMN] col_name | DROP PRIMARY KEY | DROP INDEX index_name | DISABLE KEYS | ENABLE KEYS | RENAME [TO] new_tbl_name | ORDER BY col | table_options So what it clearly tells you, is to use this (note the 'ADD'): mysql ALTER TABLE EMPLOYEE - ADD FOREIGN KEY (SUPERSSN) REFERENCES EMPLOYEE(SSN) - ON DELETE SET NULL - ON UPDATE CASCADE; Regards, Fred. -- Fred van Engen XB Networks B.V. email: [EMAIL PROTECTED]Televisieweg 2 tel: +31 36 5462400 1322 AC Almere fax: +31 36 5462424 The Netherlands -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
AW: mutual declarations produce Error 1064
-- ALTER TABLE EMPLOYEE ADD FOREIGN KEY (DNO) REFERENCES DEPARTMENT(DNUMBER) ON DELETE SET DEFAULT ON UPDATE CASCADE -- Bye Please , what else can I do ? Alter Table add foreign key runs fine, alter table Xadd foreign key referencec Y with X!=Y simply woun't compile ! All I can get is alter table X add foreign key referencec X No mutual references between any two different tables, Or does it exist another solution or workaround ? Yours Sincerely Morten Gulbrandsen The one who loves MySQL ;-) -Ursprüngliche Nachricht- Von: Fred van Engen [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 13. August 2003 15:36 An: Morten Gulbrandsen Cc: 'Victoria Reznichenko'; [EMAIL PROTECTED] Betreff: Re: mutual declarations produce Error 1064 Morten, In your extremely long mail, I think I managed to find your question and removed all other stuff. On Wed, Aug 13, 2003 at 03:18:26PM +0200, Morten Gulbrandsen wrote: mysql mysql # from now on the coding causes trouble mysql mysql ALTER TABLE EMPLOYEE - FOREIGN KEY (SUPERSSN) REFERENCES EMPLOYEE(SSN) - ON DELETE SET NULL - ON UPDATE CASCADE; ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp onds to your MySQL server version for the right syntax to use near 'FOREIGN KEY (SUPERSSN) REFERENCES EMPLOYEE(SSN) ON DELETE SET mysql 6.5.4 ALTER TABLE Syntax ALTER [IGNORE] TABLE tbl_name alter_specification [, alter_specification ...] alter_specification: ADD [COLUMN] create_definition [FIRST | AFTER column_name ] | ADD [COLUMN] (create_definition, create_definition,...) | ADD INDEX [index_name] (index_col_name,...) | ADD PRIMARY KEY (index_col_name,...) | ADD UNIQUE [index_name] (index_col_name,...) | ADD FULLTEXT [index_name] (index_col_name,...) | ADD [CONSTRAINT symbol] FOREIGN KEY [index_name] (index_col_name,...) [reference_definition] | ALTER [COLUMN] col_name {SET DEFAULT literal | DROP DEFAULT} | CHANGE [COLUMN] old_col_name create_definition [FIRST | AFTER column_name] | MODIFY [COLUMN] create_definition [FIRST | AFTER column_name] | DROP [COLUMN] col_name | DROP PRIMARY KEY | DROP INDEX index_name | DISABLE KEYS | ENABLE KEYS | RENAME [TO] new_tbl_name | ORDER BY col | table_options So what it clearly tells you, is to use this (note the 'ADD'): mysql ALTER TABLE EMPLOYEE - ADD FOREIGN KEY (SUPERSSN) REFERENCES EMPLOYEE(SSN) - ON DELETE SET NULL - ON UPDATE CASCADE; Regards, Fred. -- Fred van Engen XB Networks B.V. email: [EMAIL PROTECTED]Televisieweg 2 tel: +31 36 5462400 1322 AC Almere fax: +31 36 5462424 The Netherlands -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
AW: mutual declarations produce Error 1064
C:\mysql\binmysql -u elmasri -pnavathecompany Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 29 to server version: 4.1.0-alpha-max-debug Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql select database(); ++ | database() | ++ | company| ++ 1 row in set (0.00 sec) mysql CREATE TABLE EMPLOYEE - ( - FNAMEVARCHAR(15) NOT NULL, - MINITCHAR, - LNAMEVARCHAR(15) NOT NULL, - SSN CHAR(9) NOT NULL, - BDATEDATE, - ADDRESS VARCHAR(30), - SEX CHAR, - SALARY DECIMAL(10,2), - SUPERSSN CHAR(9), - DNO INT NOT NULL DEFAULT 1, - - PRIMARY KEY (SSN), - INDEX (SUPERSSN), - INDEX (DNO) - - )TYPE = INNODB; Query OK, 0 rows affected (0.00 sec) mysql DESCRIBE EMPLOYEE\G *** 1. row *** Field: FNAME Type: varchar(15) Collation: latin1_swedish_ci Null: Key: Default: Extra: *** 2. row *** Field: MINIT Type: char(1) Collation: latin1_swedish_ci Null: YES Key: Default: NULL Extra: *** 3. row *** Field: LNAME Type: varchar(15) Collation: latin1_swedish_ci Null: Key: Default: Extra: *** 4. row *** Field: SSN Type: varchar(9) Collation: latin1_swedish_ci Null: Key: PRI Default: Extra: *** 5. row *** Field: BDATE Type: date Collation: latin1_swedish_ci Null: YES Key: Default: NULL Extra: *** 6. row *** Field: ADDRESS Type: varchar(30) Collation: latin1_swedish_ci Null: YES Key: Default: NULL Extra: *** 7. row *** Field: SEX Type: char(1) Collation: latin1_swedish_ci Null: YES Key: Default: NULL Extra: *** 8. row *** Field: SALARY Type: decimal(10,2) Collation: binary Null: YES Key: Default: NULL Extra: *** 9. row *** Field: SUPERSSN Type: varchar(9) Collation: latin1_swedish_ci Null: YES Key: MUL Default: NULL Extra: *** 10. row *** Field: DNO Type: int(11) Collation: binary Null: Key: MUL Default: 1 Extra: 10 rows in set (0.00 sec) mysql DROP TABLE IF EXISTS DEPARTMENT; Query OK, 0 rows affected (0.02 sec) mysql CREATE TABLE DEPARTMENT - ( - DNAME VARCHAR(15) NOT NULL, - DNUMBERINT NOT NULL, - MGRSSN CHAR(9) NOT NULL DEFAULT '88866', - MGRSTARTDATE DATE, - - - PRIMARY KEY (DNUMBER), - UNIQUE (DNAME), - INDEX (MGRSSN) - )TYPE = INNODB; Query OK, 0 rows affected (0.02 sec) mysql describe department\G *** 1. row *** Field: DNAME Type: varchar(15) Collation: latin1_swedish_ci Null: Key: UNI Default: Extra: *** 2. row *** Field: DNUMBER Type: int(11) Collation: binary Null: Key: PRI Default: 0 Extra: *** 3. row *** Field: MGRSSN Type: varchar(9) Collation: latin1_swedish_ci Null: Key: MUL Default: 88866 Extra: *** 4. row *** Field: MGRSTARTDATE Type: date Collation: latin1_swedish_ci Null: YES Key: Default: NULL Extra: 4 rows in set (0.00 sec) mysql mysql # from now on the coding causes trouble mysql mysql ALTER TABLE EMPLOYEE - FOREIGN KEY (SUPERSSN) REFERENCES EMPLOYEE(SSN) - ON DELETE SET NULL - ON UPDATE CASCADE; ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp onds to your MySQL server version for the right syntax to use near 'FOREIGN KEY (SUPERSSN) REFERENCES EMPLOYEE(SSN) ON DELETE SET mysql mysql ALTER TABLE EMPLOYEE - FOREIGN KEY (DNO)REFERENCES DEPARTMENT(DNUMBER) - ON DELETE SET DEFAULT - ON UPDATE CASCADE; ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp onds to your MySQL server version for the right syntax to use near 'FOREIGN KEY (DNO) REFERENCES DEPARTMENT(DNUMBER) ON DELETE S mysql mysql ALTER TABLE DEPARTMENT - FOREIGN KEY (MGRSSN) REFERENCES EMPLOYEE(SSN) - ON DELETE SET DEFAULT - ON UPDATE CASCADE ; ERROR 1064: You have an error
AW: mutual declarations produce Error 1064
), - INDEX (SUPERSSN, SSN), - - FOREIGN KEY (SUPERSSN) - REFERENCES EMPLOYEE(SSN), - - INDEX (DNO), - FOREIGN KEY (DNO) - REFERENCES DEPARTMENT(DNUMBER) # this is declared in department - )TYPE = INNODB; ERROR 1005: Can't create table '.\company\employee.frm' (errno: 150) mysql exit Bye C:\mysql\examples\elmasrimysql -u elmasri -pnavathe company company_01.sql ERROR 1005 at line 9: Can't create table '.\company\department.frm' (errno: 150) This shows that I actually can create a table, My question is now, Is this code ansi sql correct ? How can I Modify it to run under the latest MySQL ? Is it something wrong with the users I have created ? I expect one user and one password for entering mysql, And depending upon which database I'd like to use I expect for each database I'd like to use, one second password, This seems to be another topic, When I write mysql grant all on company.* to 'elmasri'@'localhost' identified by 'navathe'; Query OK, 0 rows affected (0.00 sec) mysql grant all on company.* to 'elmasri'@'%' identified by 'navathe'; Query OK, 0 rows affected (0.00 sec) mysql Then I should be able to do whatever SQL permits ? Yours sincerely Morten Gulbrandsen -Ursprüngliche Nachricht- Von: Victoria Reznichenko [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 7. August 2003 13:54 An: [EMAIL PROTECTED] Betreff: Re: mutual declarations produce Error 1064 Morten Gulbrandsen [EMAIL PROTECTED] wrote: USE company; # SHOW INNODB STATUS; DROP TABLE IF EXISTS DEPARTMENT; CREATE TABLE DEPARTMENT ( DNAME VARCHAR(15) NOT NULL, DNUMBER INT NOT NULL, MGRSSN CHAR(9) NOT NULL, MGRSTARTDATEDATE, PRIMARY KEY (DNUMBER), UNIQUE (DNAME), INDEX (MGRSSN), # between employee and department FOREIGN KEY (MGRSSN),# a sort of mutually declaration REFERENCES EMPLOYEE(SSN) # this is declared in employee Remove comma before REFERENCES. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mutual declarations produce Error 1064
Morten Gulbrandsen [EMAIL PROTECTED] wrote: I think something is wrong with my administration, Basically I get these messages, ERROR 1005 at line 9: Can't create table '.\company\department.frm' (errno: 150) ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) ERROR 1133: Can't find any matching row in the user table C:\mysql\examples\elmasrimysql -u root -p*** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 16 to server version: 4.1.0-alpha-max-debug Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql use mysql; Database changed mysql update user set password = password('navathe') where user = 'elmasri'; Query OK, 1 row affected (0.02 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql flush privileges; Query OK, 0 rows affected (0.02 sec) mysql quit Bye C:\mysql\examples\elmasrimysql -u elmasri -pnavathe company Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 17 to server version: 4.1.0-alpha-max-debug Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql quit Bye C:\mysql\examples\elmasrimysql -u elmasri -pnavathe company company_01.sql ERROR 1005 at line 9: Can't create table '.\company\department.frm' (errno: 150) C:\mysql\examples\elmasri C:\mysql\examples\elmasritype company_01.sql # mysql -u root -h localhost -p -vvv company_01.sql USE company; # SHOW INNODB STATUS; DROP TABLE IF EXISTS DEPARTMENT; CREATE TABLE DEPARTMENT ( DNAME VARCHAR(15) NOT NULL, DNUMBER INT NOT NULL, MGRSSN CHAR(9) NOT NULL, MGRSTARTDATEDATE, PRIMARY KEY (DNUMBER), UNIQUE (DNAME), INDEX (MGRSSN), # between employee and department FOREIGN KEY (MGRSSN)# a sort of mutually declaration REFERENCES EMPLOYEE(SSN) # this is declared in employee )TYPE = INNODB; You create table DEPARTMENT with foreign key, which is referenced to the non-existent table EMPLOYEE. So, you need to create both table without foreign keys and then add foreign key constraints or execute SET FOREIGN_KEY_CHECKS=0 before table creation. DROP TABLE IF EXISTS EMPLOYEE; CREATE TABLE EMPLOYEE ( FNAME VARCHAR(15) NOT NULL, MINIT CHAR, LNAME VARCHAR(15) NOT NULL, SSN CHAR(9) NOT NULL, BDATE DATE, ADDRESS VARCHAR(30), SEX CHAR, SALARY DECIMAL(10,2), SUPERSSNCHAR(9), DNO INT NOT NULL, PRIMARY KEY (SSN), INDEX (SUPERSSN, SSN), FOREIGN KEY (SUPERSSN) REFERENCES EMPLOYEE(SSN), INDEX (DNO, DNUMBER), FOREIGN KEY (DNO) REFERENCES DEPARTMENT(DNUMBER) # this is declared in department )TYPE = INNODB; C:\mysql\examples\elmasrimysql -u root -p*** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 19 to server version: 4.1.0-alpha-max-debug Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql grant all on company.* to 'elmasri'@'localhost' identified by 'navathe'; Query OK, 0 rows affected (0.00 sec) mysql quit Bye C:\mysql\examples\elmasrimysql -u elmasri -pnavathe company; ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) C:\mysql\examples\elmasrimysql -u root -p*** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 21 to server version: 4.1.0-alpha-max-debug Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql set password for 'elmasri'@'localhost' = password('navathe'); Query OK, 0 rows affected (0.00 sec) mysql set password for 'elmasri'@'%' = password('navathe'); ERROR 1133: Can't find any matching row in the user table mysql It means the there is no any entry 'elmasri'@'%' in the table user. I try again with Manually mysql create table employee( fname varchar(15) )type=innodb; Query OK, 0 rows affected (0.00 sec) mysql DROP TABLE IF EXISTS EMPLOYEE; Query OK, 0 rows affected (0.00 sec) And mysql CREATE TABLE EMPLOYEE - ( - FNAMEVARCHAR(15) NOT NULL, - MINITCHAR, - LNAMEVARCHAR(15) NOT NULL, - SSN CHAR(9) NOT NULL, - BDATEDATE, - ADDRESS VARCHAR(30), - SEX CHAR, - SALARY DECIMAL(10,2), - SUPERSSN CHAR(9), - DNO INT NOT NULL, - - PRIMARY KEY (SSN), - INDEX (SUPERSSN, SSN), - - FOREIGN KEY (SUPERSSN) - REFERENCES EMPLOYEE(SSN), - - INDEX (DNO, DNUMBER), - FOREIGN KEY (DNO) - REFERENCES DEPARTMENT(DNUMBER) # this is declared in department - )TYPE = INNODB; ERROR 1072: Key column 'DNUMBER' doesn't exist in table I don't see column DNUMBER in the above create table definition. mysql create table
Re: mysqldump suddenly returns error 1064
David Precious [EMAIL PROTECTED] wrote: I hope this isn't an obvious question, but I'm having a hard time figuring this one out. I have a cron job set up to run mysqldump regularly to dump my databases out to a flat file, which is then compressed and passed to our backup server by another script. The cron job runs the command: mysqldump -Aac --add-drop-table --all-databases --opt /tmp/mysqldump This had been working fine for ages. However, now I'm getting an error every time it runs, indicating that there's a problem with the SQL syntax - however, this is the SQL being written out by mysqldump, and nothing on the server has changed which I would expect to cause this - MySQL hasn't been reconfigured or upgraded or anything. The error I'm seeing is: mysqldump: Got error: 1064: You have an error in your SQL syntax near '404 READ /*!32311 LOCAL */' at line 1 when using LOCK TABLES Just for info: MySQL v3.23.51 on Slackware Linux 9.0 (on a high-performance dual-Xeon server). Anyone got any ideas what could be causing this to happen? Table name :) It consists only of digits. Use -Q option of mysqldump. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqldump suddenly returns error 1064 [sorted]
snip mysqldump: Got error: 1064: You have an error in your SQL syntax near '404 READ /*!32311 LOCAL */' at line 1 when using LOCK TABLES Anyone got any ideas what could be causing this to happen? snip Table name :) It consists only of digits. Use -Q option of mysqldump. Aaahh! I can't believe I didn't get that one. I've been trying to figure it out for ages! Of course, it all makes sense now. And, looking back through the cron job output, it started doing it right around the time that table got created. Many thanks for your help Victoria, you've saved me from tearing out a considerable amount of hair! Cheers David P -- David Precious [EMAIL PROTECTED] http://www.preshweb.co.uk A mind is a terrible thing to ... er ... h Now playing: Oasis - Whatever (Live, Knebworth) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqldump suddenly returns error 1064
Hi all, I hope this isn't an obvious question, but I'm having a hard time figuring this one out. I have a cron job set up to run mysqldump regularly to dump my databases out to a flat file, which is then compressed and passed to our backup server by another script. The cron job runs the command: mysqldump -Aac --add-drop-table --all-databases --opt /tmp/mysqldump This had been working fine for ages. However, now I'm getting an error every time it runs, indicating that there's a problem with the SQL syntax - however, this is the SQL being written out by mysqldump, and nothing on the server has changed which I would expect to cause this - MySQL hasn't been reconfigured or upgraded or anything. The error I'm seeing is: mysqldump: Got error: 1064: You have an error in your SQL syntax near '404 READ /*!32311 LOCAL */' at line 1 when using LOCK TABLES Just for info: MySQL v3.23.51 on Slackware Linux 9.0 (on a high-performance dual-Xeon server). Anyone got any ideas what could be causing this to happen? Many thanks David P -- David Precious [EMAIL PROTECTED] http://www.preshweb.co.uk A clear conscience is usually the sign of a bad memory -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
syntax error 1064 ||
Hail, Below is the table that is generating the following error: LOAD DATA LOCAL INFILE '/www/htdocs/car-list/admin/8_rows_dealerX_test.csv' REPLACE INTO TABLE carlist_db.e_xoops_dealerX_cardealers FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\r' (manufacture name,name,street address,city,state,zipcode) Error: 1064 - You have an error in your SQL syntax near 'name,name,street address,city,state,zipcode)' at line 1 when I attempt to LOAD DATA INFILE the tab delimited field ascii file. = Field Type Null Default == manufacture name | varchar(20)| Yes | NULL name | varchar(50)| Yes | NULL street address| varchar(50)| Yes | NULL city| varchar(20)| Yes | NULL state | char(2) | Yes | NU zipcode | tinyint(12) | No | 0 === Suggestions if i have the data types correct? street address has numbers and characters. obliged, Stretch - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: syntax error 1064 ||
In the last episode (Mar 06), Lou Ann Hammond said: Hail, Below is the table that is generating the following error: LOAD DATA LOCAL INFILE '/www/htdocs/car-list/admin/8_rows_dealerX_test.csv' REPLACE INTO TABLE carlist_db.e_xoops_dealerX_cardealers FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\r' (manufacture name,name,street address,city,state,zipcode) Error: 1064 - You have an error in your SQL syntax near 'name,name,street address,city,state,zipcode)' at line 1 You have field names with spaces in them; you will have to escape them with backtics: BY '\t' LINES TERMINATED BY '\r' (`manufacture name`,name,`street address`, city,state,zipcode) -- Dan Nelson [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
error 1064 and sol 8
okay - mysql build is killing me here .. when I run mysql_install_db, gives me the following error ERROR 1064 : use mysql; INVALID SYNTAX I cannot get mysqld to start - it keeps saying ERROR: 1064 syntax error near '' at line 1 what is goign on here ... - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: mysqldump ERROR 1064
- Original Message - From: David Angela Ehmer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 04, 2003 11:00 PM Subject: mysqldump ERROR 1064 Hi I am having problems generating the mysqldump file. I have tried a range of options and carefully studied several tutorials I have on using this command. Each time I get the following errror. ERROR 1064 you have an error in your SQL syntax near 'mysqldump -u root -p adrienne netno_db sql.dump' at line 1. I appear to have other problems with some commands. For example if I type; mysqladmin --help at the command line I get the 1064 ERROR Appreciate any suggestions about what may be the problem here David It looks like you're trying to run the mysqldump and mysqladmin commands from within the mysql client rather than from the shell's command line. Quit out of the mysql client and try running them from the command line. And when you specify the -p password on the command line, do not include a space between the -p and the password. Try instead: mysqldump -u root -padrienne netno_db sql.dump Best regards, Bruce - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
mysqldump ERROR 1064
Hi I am having problems generating the mysqldump file. I have tried a range of options and carefully studied several tutorials I have on using this command. Each time I get the following errror. ERROR 1064 you have an error in your SQL syntax near 'mysqldump -u root -p adrienne netno_db sql.dump' at line 1. I appear to have other problems with some commands. For example if I type; mysqladmin --help at the command line I get the 1064 ERROR Appreciate any suggestions about what may be the problem here David - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: mysqldump ERROR 1064
On Sun, 2003-01-05 at 00:00, David Angela Ehmer wrote: Hi I am having problems generating the mysqldump file. I have tried a range of options and carefully studied several tutorials I have on using this command. Each time I get the following errror. ERROR 1064 you have an error in your SQL syntax near 'mysqldump -u root -p adrienne netno_db sql.dump' at line 1. Don't have a space between p and password it should be as : mysqldump -u root -padrienne netno-db sql.dump - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
ERROR 1064 ...
hi, got a little problem during learning mysql : have made a file called create_member.sql, looks like this here : CREATE TABLE member { last_name VARCHAR(20) NOT NULL, first_name VARCHAR(20) NOT NULL, suffix VARCHAR(5) NULL, expiration DATE NULL DEFAULT '-00-00', email VARCHAR(100) NULL, street VARCHAR(50) NULL, city VARCHAR(50) NULL, state VARCHAR(2) NULL, zip VARCHAR(10) NULL, phone VARCHAR(20) NULL, interests VARCHAR(255) NULL } then I tried : mysql samp_db -u root -p create_member.sql and get the following message : [papabaer@hanna papabaer]$ mysql samp_db -u root -p create_member.sql Enter password: ERROR 1064 at line 1: You have an error in your SQL syntax near '{ last_name VARCHAR(20) NOT NULL, first_name VARCHAR(20) NOT NULL, suffix VAR' at line 2 now I got a liitle hickup, because don't know, whats happen - don't know why this error-message am using MySQL-3.23.47-5mdk on a mdk 8.2 box hope anyone can help ? this example is from Paul DuBois's book Mysql thanks and bye hans - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
re: ERROR 1064 ...
hans, Tuesday, October 01, 2002, 1:02:02 PM, you wrote: hp got a little problem during learning mysql : hp have made a file called create_member.sql, looks like this here : hp CREATE TABLE member hp { hp last_name VARCHAR(20) NOT NULL, hp first_name VARCHAR(20) NOT NULL, hp suffix VARCHAR(5) NULL, hp expiration DATE NULL DEFAULT '-00-00', hp email VARCHAR(100) NULL, hp street VARCHAR(50) NULL, hp city VARCHAR(50) NULL, hp state VARCHAR(2) NULL, hp zip VARCHAR(10) NULL, hp phone VARCHAR(20) NULL, hp interests VARCHAR(255) NULL hp } hp then I tried : hp mysql samp_db -u root -p create_member.sql hp and get the following message : hp [papabaer@hanna papabaer]$ mysql samp_db -u root -p create_member.sql hp Enter password: hp ERROR 1064 at line 1: You have an error in your SQL syntax near '{ hp last_name VARCHAR(20) NOT NULL, hp first_name VARCHAR(20) NOT NULL, hp suffix VAR' at line 2 hp now I got a liitle hickup, because don't know, whats happen - don't know why hp this error-message You should use '(', ')' instead of '{','}'. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: error 1064
Gene Gurevich wrote: Hi all: I'm trying to import the tables from the dump file via mysqldump testdb exp That should be: mysql testdb exp and it complaints about the command in the export file: DROP TABLE IF EXISTS db; CREATE TABLE db ( Host char(60) NOT NULL default '', Db char(64) NOT NULL default '', User char(16) NOT NULL default '', Select_priv enum('N','Y') NOT NULL default 'N', Insert_priv enum('N','Y') NOT NULL default 'N', Update_priv enum('N','Y') NOT NULL default 'N', Delete_priv enum('N','Y') NOT NULL default 'N', Create_priv enum('N','Y') NOT NULL default 'N', Drop_priv enum('N','Y') NOT NULL default 'N', Grant_priv enum('N','Y') NOT NULL default 'N', References_priv enum('N','Y') NOT NULL default 'N', Index_priv enum('N','Y') NOT NULL default 'N', Alter_priv enum('N','Y') NOT NULL default 'N', UNIQUE KEY Primary (Host,Db,User), KEY User (User) ) TYPE=MyISAM MAX_ROWS=1000 PACK_KEYS=1 Specifically the last three lines. The file I'm using was created via mysqldump --add-drop-table --all-databases. I can't understand why a file created by a mysqldump can have any issues. Can anyone explain that for me? Is there a error search engine on mysql.com (something like oracle has on oracle.com)? thanks in advance = __ Do You Yahoo!? Get email alerts NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- Gerald L. Clark [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: error 1064
That's what I used : mysql testdb exp. Sorry about the typo Gene --- Gerald Clark [EMAIL PROTECTED] wrote: Gene Gurevich wrote: Hi all: I'm trying to import the tables from the dump file via mysqldump testdb exp That should be: mysql testdb exp and it complaints about the command in the export file: DROP TABLE IF EXISTS db; CREATE TABLE db ( Host char(60) NOT NULL default '', Db char(64) NOT NULL default '', User char(16) NOT NULL default '', Select_priv enum('N','Y') NOT NULL default 'N', Insert_priv enum('N','Y') NOT NULL default 'N', Update_priv enum('N','Y') NOT NULL default 'N', Delete_priv enum('N','Y') NOT NULL default 'N', Create_priv enum('N','Y') NOT NULL default 'N', Drop_priv enum('N','Y') NOT NULL default 'N', Grant_priv enum('N','Y') NOT NULL default 'N', References_priv enum('N','Y') NOT NULL default 'N', Index_priv enum('N','Y') NOT NULL default 'N', Alter_priv enum('N','Y') NOT NULL default 'N', UNIQUE KEY Primary (Host,Db,User), KEY User (User) ) TYPE=MyISAM MAX_ROWS=1000 PACK_KEYS=1 Specifically the last three lines. The file I'm using was created via mysqldump --add-drop-table --all-databases. I can't understand why a file created by a mysqldump can have any issues. Can anyone explain that for me? Is there a error search engine on mysql.com (something like oracle has on oracle.com)? thanks in advance = __ Do You Yahoo!? Get email alerts NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: I get SYNTAX ERROR 1064 with mySQL 3.2.3 when using delete as shown (a correction)
MySQL doen not yet support nested queries. Jawad Khan wrote: server version 3.23.35 -Original Message- From:Khan, Jawad [COLE:6S34:EXCH] Sent:Thursday, June 28, 2001 1:13 PM To: '[EMAIL PROTECTED]' Subject: I get SYNTAX ERROR 1064 with mySQL 3.2.3 when using delete as shown Hope you can find the problem in the following SQL command: delete from alarms where raiseTime = ( select MIN(raiseTime) from alarms) limit 1 ; raiseTime is of type BIGINT. -- Gerald L. Clark [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
I get SYNTAX ERROR 1064 with mySQL 3.2.3 when using delete as sho wn
Hope you can find the problem in the following SQL command: delete from alarms where raiseTime = ( select MIN(raiseTime) from alarms) limit 1 ; raiseTime is of type BIGINT.
RE: I get SYNTAX ERROR 1064 with mySQL 3.2.3 when using delete as shown (a correction)
server version 3.23.35 -Original Message- From: Khan, Jawad [COLE:6S34:EXCH] Sent: Thursday, June 28, 2001 1:13 PM To: '[EMAIL PROTECTED]' Subject: I get SYNTAX ERROR 1064 with mySQL 3.2.3 when using delete as shown Hope you can find the problem in the following SQL command: delete from alarms where raiseTime = ( select MIN(raiseTime) from alarms) limit 1 ; raiseTime is of type BIGINT.
RE: I get SYNTAX ERROR 1064 with mySQL 3.2.3 when using delete a
On 28-Jun-01 Jawad Khan wrote: Hope you can find the problem in the following SQL command: delete from alarms where raiseTime = ( select MIN(raiseTime) from alarms) limit 1 ; That is a sub-select, currently unsupported in MySQL. try : delete from alarms order by raiseTime limit 1; Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Install question and an ERROR 1064 question
Hello, I'm running mysql 3.23.37 on a Debian potato install. I ran through the install from the mysql.com web site. Everything seems to work ok but I do have one question. When I run mysqladmin or mysql I have to put a ./ in front. I get a command not found if I don't. Is this correct behavior? I'm trying to run through a mysql/perl tutorial I found on a web site that produces a guestbook. When I enter this line: mysql -uroot -einsert into user(Host,User,Password) values('localhost','guestbook',password('guestbook') mysql after entering the previous lines fine, I get the following error: ./mysql -uroot -einsert into user(Host,User,Password) values('localhost','guestbook',password('guestbook') mysql ERROR 1064 at line 1: You have an error in your SQL syntax near 'user(Host,User,Password) values('localhost','guestbook',password('guestbook')' at line 1 I also tried this on mysql 3.23.36 with the same result. Any thoughts would be appreciated. Thanks, Mike - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php