Mysqldump Windows Error 1064
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About error 1064 mysql 42000 restore Us Learn more about Stack Overflow the company Business Learn more about hiring error 1064 mysql 42000 you have an error in your sql syntax developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the mysqldump you have an error in your sql syntax 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 While importing mysqldump file ERROR 1064 error 1064 mysql 42000 mysql (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, `COMMENTS` varchar(256) DEFAULT NULL, PRIMARY KEY (`ID`), UNIQUE KEY `UK_ATTACHMENT_TYPES___DESCRIPTION` (`DESCRIPTION`) ) ENGINE=InnoDB AUTO_INCREMENT=4
Stats_persistent 0
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 look something like this: mysqldump -u root -p --default-character-set=utf8 --result-file=database1.backup.sql database1 While Importing you can optionally use: mysql --user=root --password=root --default_character_set utf8 < database1.backup.sql Source:http://nathan.rambeck.org/blog/1-preventing-encoding-issues-mysqldump share|improve this answer answere
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 line 2495: You have an error in your SQL syntax; check the manual that corresponds
Error 1064 Mysql 42000 Create Table
to your MySQL server version for the right syntax to use near 'STATS_PERSISTENT=0' at line mysqldump couldn t execute set option sql_quote_show_create 1 11What does this mean? I can't open the mysqldump sql file to check the line because it's too big.(The restore seems mysqldump access denied to work for some tables, but maybe missed some databases)UpdateCancelPromoted by Periscopedata.comData Scientist Pro Tools. Analyze billions of rows in seconds.Get 150x faster queries, beautiful dashboards, and easy-to-share reports. Start a free trial today!Learn More at http://stackoverflow.com/questions/21752550/while-importing-mysqldump-file-error-1064-42000-near-at-line-1 Periscopedata.comAnswer 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 5.5 or older.Version-specific syntax is supposed to be enclosed in special comment delimiters so it doesn't cause this https://www.quora.com/What-does-error-1064-mean-when-restoring-a-MySQL-dump 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...Written 11w ago$ perror 1064MySQL error code 1064 (ER_PARSE_ERROR): %s near '%-.80s' at line %dWhich basically says that there is a syntax error in the SQL query. If you are getting this error in mysql dump, it means that there are some “unusual” characters in the dump which mysql was not able to process while executing the queries.The best way to solve this is
when restoring a mysql dump Adarsh Agarwal SubscribeSubscribedUnsubscribe11 Loading... Loading... Working... Add to Want to watch this again later? Sign in to add this video to a playlist. Sign in Share https://www.youtube.com/watch?v=dDBb8KHJmWM More Report Need to report the video? Sign in to report inappropriate content. Sign in Statistics 597 views 1 Like this video? Sign in to make your opinion count. Sign in 2 2 Don't like this video? Sign in to make your opinion count. Sign in 3 Loading... Loading... Loading... Rating is available when the video has been rented. error 1064 This feature is not available right now. Please try again later. Published on Mar 8, 2016Mysql data restoration error Category People & Blogs License Standard YouTube License Show more Show less Loading... Autoplay When autoplay is enabled, a suggested video will automatically play next. Up next Fix 1064 Sql Error With New Techinque By Ali Khan - Duration: 9:12. Devil error 1064 mysql Killer 1,106 views 9:12 You have an error in your SQL syntax - Duration: 8:51. InMotion Hosting 36,930 views 8:51 How to use the mysqldump command - a working example - Duration: 3:58. Ranginald 68,530 views 3:58 [ 3 ] [ التَّخطِّى والإرباك] تخطى الخطأ الشائع Error 1064 [المساحات البيضاء] - Duration: 18:30. GazaHackerTeam Mojahden 736 views 18:30 MySQL Tutorial for Beginners - 1 - Creating a Database and Adding Tables to it - Duration: 8:50. primetubervideos 662,121 views 8:50 Fix Mysql #1273 unknown collaction:'utf8mb4_unicode_ci' - Duration: 3:16. Onephin 116 views 3:16 How To Bypass 1046 Sql Error By Ali Khan - Duration: 7:47. Devil Killer 1,469 views 7:47 что делать если BlueStacks не устанавливается или незапускается - Duration: 4:37. M9snikFeed You_Tube 123,174 views 4:37 How to fix phpmyadmin access denied #2002 in wamp server - Duration: 6:10. newtech 2,564 views 6:10 How To Install mySQL in Windows 10 - Duration: 8:23. DENRIC DENISE - INFO 82,186 views 8:23 PHP MySQL Tutorial: Create a Database and Table in phpMyAdmin -HD- - Duration: 11:26. RiverCityGraphix 284,428 views 11:26 H