Error 1064 When Using Mysqldump
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 error 1064 mysql 42000 mysqldump About Us Learn more about Stack Overflow the company Business Learn more about using mysqldump for backups hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss
Using Mysqldump To Create A Database Copy
Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up While importing mysqldump file
Error 1064 Mysql 42000 Mysql Import
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, `COMMENTS` varchar(256) DEFAULT NULL, PRIMARY KEY (`ID`), UNIQUE KEY `UK_ATTACHMENT_TYPES___DESCRIPTION` error 1064 mysql 42000 restore (`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 1121115 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_chara
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting
Error 1064 Mysql 42000 You Have An Error In Your Sql Syntax
ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the mysqldump you have an error in your sql syntax Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a stats_persistent 0 minute: Sign up Error while taking backup with mysqldump in mysql command line up vote 4 down vote favorite Hello I'm trying to take backup from mysql command line client. I'm using mysqldump to take backup with username and password. Following http://stackoverflow.com/questions/21752550/while-importing-mysqldump-file-error-1064-42000-near-at-line-1 is the command I'm using for backing up the database. mysql> mysqldump -u username -p password databasename > backup.sql; I'm getting following error ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql dump -u username -p password fms > backup.sql' at line 1 Though the command seems to be correct, still i'm getting error. Please let me know is there any other way http://stackoverflow.com/questions/8575356/error-while-taking-backup-with-mysqldump-in-mysql-command-line taking backup from mysql command line. Thanks in advance. mysql mysqldump share|improve this question edited Dec 20 '11 at 12:22 matino 10.6k42544 asked Dec 20 '11 at 12:18 harshakasireddy 123111 add a comment| 5 Answers 5 active oldest votes up vote 14 down vote accepted mysqldump is not a MySQL command, it is a command line utility. You must call it from your shell command line. share|improve this answer answered Dec 20 '11 at 12:24 Timur 4,88011230 How do I access shell command line? –harshakasireddy Dec 22 '11 at 6:33 The same way you are accessing it to run mysql -u username -ppassword command - via SSH –Timur Dec 22 '11 at 6:49 Thanks for replaying. –harshakasireddy Dec 22 '11 at 7:39 add a comment| up vote 2 down vote The problem is you are executing the command from a MySQL prompt instead of a Linux shell. Exit the mysql command line and run the command from a OS shell (remove the semicolon at the end) share|improve this answer answered Dec 20 '11 at 12:24 Wilmer 87247 Thanks for replaying. –harshakasireddy Dec 22 '11 at 7:39 add a comment| up vote 1 down vote In your command, you can't have a space between -p and the password. Also, mysqldump has to be run on the command line, not in a mysql shell. Try this on your command line mysqldump -u username -ppassword databasename > backup.sql share|improve t
Get Kubuntu Get Xubuntu Get Lubuntu Get UbuntuStudio Get Mythbuntu Get Edubuntu Get Ubuntu-GNOME Get UbuntuKylin Ubuntu Code of Conduct Ubuntu Wiki Community Wiki Other Support Launchpad Answers Ubuntu IRC Support AskUbuntu Official Documentation User Documentation Social Media Facebook Twitter Useful https://ubuntuforums.org/showthread.php?t=1910490 Links Distrowatch Bugs: Ubuntu PPAs: Ubuntu Web Upd8: Ubuntu OMG! Ubuntu Ubuntu Insights Planet Ubuntu Activity Page Please read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms [SOLVED] mysqldump, ERROR 1064 (42000): You have an error in your SQL syntax; Having an Issue With Posting ? Do you want to help us debug the posting issues ? < is the place to report it, thanks ! error 1064 Results 1 to 3 of 3 Thread: mysqldump, ERROR 1064 (42000): You have an error in your SQL syntax; Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode January 17th, 2012 #1 1cookie View Profile View Forum Posts Private Message A Carafe of Ubuntu Join Date Jun 2010 Location Manchester Beans 92 DistroLubuntu 16.04 Xenial Xerus mysqldump, ERROR 1064 (42000): You have an error in your SQL error 1064 mysql syntax; hi My environment is: mysql ver 14.14 Distrib 5.1.58, running on Ubuntu, Apache localhost. I'm in the MySQL CLI trying to run the command: Code: mysql> mysqldump -u cookie -p coffee_shop > /home/andy/backup/dump.sql; This should dump the coffee_shop database to a file named: dump.sql, pretty simple. It doesn't work? I get a MySQL error: Code: 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 'mysqldump -u cookie -p coffee_shop > /home/andy/backup/dump.sql' at line 1 It should be pretty standard stuff, what's wrong with my syntax? Adv Reply January 17th, 2012 #2 Wayne_V View Profile View Forum Posts Private Message Quad Shot of Ubuntu Join Date Oct 2008 Location Stuttgart, Germany Beans 441 DistroUbuntu 10.04 Lucid Lynx Re: mysqldump, ERROR 1064 (42000): You have an error in your SQL syntax; you are running mysqldump from within mysql? Adv Reply January 17th, 2012 #3 1cookie View Profile View Forum Posts Private Message A Carafe of Ubuntu Join Date Jun 2010 Location Manchester Beans 92 DistroLubuntu 16.04 Xenial Xerus Re: mysqldump, ERROR 1064 (42000): You have an error in your SQL syntax; Originally Posted by Wayne_V you are running mysqldump from within mysql? What a noob! Me that is. Thanks Wayne. Adv Reply Quick Navigation Server Platforms Top Site Areas Settings Private Messages