Mysql Error 1064 At Line
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies error 1064 mysql 42000 you have an error in your sql syntax of this site About Us Learn more about Stack Overflow the company
Error 1064 Mysql 42000 Mysql Import
Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users
Error 1064 Mysql 42000 Create Table
Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a
Error Code 1064 In Mysql
minute: Sign up While importing mysqldump file ERROR 1064 (42000) near '■/ ' at line 1 up vote 6 down vote favorite 5 Cannot import the below dump file created by mysqldump.exe in command line of windows /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `attachment_types` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `DESCRIPTION` varchar(50) DEFAULT NULL, error 1064 mysql 42000 create database `COMMENTS` varchar(256) DEFAULT NULL, PRIMARY KEY (`ID`), UNIQUE KEY `UK_ATTACHMENT_TYPES___DESCRIPTION` (`DESCRIPTION`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; While importing the file in command line mysql --user=root --password=root < mysqldumpfile.sql It throws error ERROR 1064 (42000) near ' ■/ ' at line 1 Somebody please help me. mysql windows mysqldump share|improve this question edited Mar 16 at 4:47 asked Feb 13 '14 at 11:12 Pavan Kumar N 1171115 1 did you try to change your CHARSET? maybe use UTF8_general_ci –marcosh Feb 13 '14 at 11:13 @marcosh thank you for pointing me to that. I found the solution. Refer to my answer. –Pavan Kumar N Feb 13 '14 at 14:26 add a comment| 3 Answers 3 active oldest votes up vote 14 down vote accepted Finally I got a solution We need two options --default-character-set=utf8: This insures UTF8 is used for each field --result-file=file.sql: This option prevents the dump data from passing the through the Operating System which likely does not use UTF8. Instead it passes the dump data directly to the file specified. Using these new options your dump command would l
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of error 1064 (42000) at line 1 this site About Us Learn more about Stack Overflow the company Business error 1064 mysql 42000 restore Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask error 1064 mysql 42000 insert Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up http://stackoverflow.com/questions/21752550/while-importing-mysqldump-file-error-1064-42000-near-at-line-1 MySQL problem: ERROR 1064 (42000) up vote 3 down vote favorite 3 I am trying to populate a new MySQL empty database with a db dump created from MS SQL Azure database, and I get the following error ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; Check the manual that corresponds to your MySQL server version for http://stackoverflow.com/questions/6998705/mysql-problem-error-1064-42000 the right syntax to use near 'I ' at line 1 I used mysqldump to perform this operation and used command similar to the following in the command prompt: mysql --user=rootusername --pasword=password databasename < dumpfilename.sql Mysqldump took about 30 minutes to display this error message. mysql sql-server azure mysqldump mysql-error-1064 share|improve this question edited Sep 10 '12 at 5:53 Marc Alff 4,3751343 asked Aug 9 '11 at 15:27 siva636 3,923186199 Can you show the first couple of lines of the dump file (censor any personal information). Becouse we need to know what it means with 'l' and why it would give an error there. –Manuel Aug 9 '11 at 15:33 The sql dump file starts as: IF NOT EXISTS (SELECT * FROM ......... –siva636 Aug 9 '11 at 15:40 add a comment| 9 Answers 9 active oldest votes up vote 4 down vote Do you have a specific database selected like so: USE database_name Except for that i cant think of any reason for this error. share|improve this answer answered Aug 9 '11 at 21:12 Manuel 6,22742853 I used the comma
database using mysqldump. Then I do: mysql -u root -p < /media/sf_share/mysqldump/all-databases.sqlThen I get the error:^[ERROR 1064 (42000) at https://www.quora.com/What-does-error-1064-mean-when-restoring-a-MySQL-dump line 2495: You have an error in your SQL syntax; check the http://forum.centos-webpanel.com/mysql/error-when-importing-mysql-dump-file/ manual that corresponds to your MySQL server version for the right syntax to use near 'STATS_PERSISTENT=0' at line 11What does this mean? I can't open the mysqldump sql file to check the line because it's too big.(The restore seems to work for some tables, but error 1064 maybe missed some databases)UpdateCancelAnswer Wiki3 Answers Bill Karwin, Oracle Ace, MySQL Contributor, author of "SQL Antipatterns: Avoiding the PitfallWritten 71w agoThe STATS_PERSISTENT is a table option that was introduced in MySQL 5.6. The option won't be recognized in an earlier version of MySQL. So you're probably trying to restore the dump to an instance of MySQL error 1064 mysql 5.5 or older.Version-specific syntax is supposed to be enclosed in special comment delimiters so it doesn't cause this error, but this particular option was mistakenly not enclosed in a comment.See bug report: SHOW CREATE TABLE doesn't put STATS_PERSISTENT into version specific commentsThis bug is "verified" which means MySQL QA confirms that it is a bug, but it has not been fixed.One workaround is to use "mysqldump --skip-create-options" when you produce your dump file, which will omit all MySQL-specific table options.Another workaround is to filter your dumpfile using a streaming text tool such as sed, so you don't have to open the whole file in a text editor.4.6k Views · View UpvotesRelated QuestionsMore Answers BelowWhy mysql_fetch_array() have this error?How do I fix a MySQL Error 1064?What does 1064 error mean when creating tables?How do you back up and restore a MySQL database?What do these MySQL errors mean for the connection file when running the index file? Jayant Kumar, worked on mysql performance tuning. setup multi-master replication - now runn...W
Print Pages: [1] Author Topic: Error when importing mysql dump file (Read 2923 times) 0 Members and 1 Guest are viewing this topic. bryan2019 Newbie Posts: 15 Error when importing mysql dump file « on: February 19, 2015, 04:27:56 PM » I reformat the server and reinstall it again.But when I import the mysql dump file using command line I received this error bellow.Is my syntax wrong??Database: bryan_mydataUsername: bryan_mydatamysql -u bryan_mydata -p bryan_mydata < bryan_mydb.sqlERROR 1064 (42000) at line 91126: 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 1When I import using PHPMyAdmin I received this errorThe browser say no data received after 100% of uploading. Please help me.. Logged zakrpa Jr. Member Posts: 66 Re: Error when importing mysql dump file « Reply #1 on: February 19, 2015, 05:49:32 PM » syntax is ok if you get that error while importing from command too then you have error in sql file Logged bryan2019 Newbie Posts: 15 Re: Error when importing mysql dump file « Reply #2 on: February 20, 2015, 01:34:31 AM » Quote from: zakrpa on February 19, 2015, 05:49:32 PMsyntax is ok if you get that error while importing from command too then you have error in sql file How to fix that error in sql file? Logged zakrpa Jr. Member Posts: 66 Re: Error when importing mysql dump file « Reply #3 on: February 20, 2015, 10:37:22 AM » well dont know how good are you with mysql but check that line manually and see whats there. or you can try export db again of course if you have access Logged erm3nda Full Member Posts: 191 Re: Error when importing mysql dump file « Reply #4 on: February 20, 2015, 11:25:03 PM » Quote from: zakrpa on February 19, 2015, 05:49:32 PMsyntax is ok if you get that error while importing from command too then you have error in sql file I think is important to know if the file was generated with phpmyadmin too.I don't spect a dump from phpmyadmin to fail.Maybe is a encoding problem. Logged 8==D it's a function that try to compare 8 (int) against D (string) and not ALWAYS does return false. Administrator Administrator Hero Member Posts: 1263 Don't forget to donate Re: Error when importing mysql dump file « Reply #5 on: March 10, 2015, 11:54:01 PM » Quotemysql -u bryan_mydata -p bryan_mydata < bryan_mydb.sqlERROR 1064 (42000) at line 91126: You have an error in your SQL syntax; check the manual that corresponds to your MySQ