Error 42000 Mysql Dump
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
Error 1064 Mysql 42000 Mysql Import
site About Us Learn more about Stack Overflow the company Business Learn more error 1064 mysql 42000 restore about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x error 1064 mysql 42000 you have an error in your sql syntax Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up While importing
Mysqldump Error 1064
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, `COMMENTS` varchar(256) DEFAULT NULL, PRIMARY KEY (`ID`),
Error 1064 Mysql 42000 Create Table
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 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
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 stats_persistent 0 more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags
Mysqldump Couldn't Execute 'set Option Sql_quote_show_create=1'
Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, mysqldump windows command line helping each other. Join them; it only takes a 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 http://stackoverflow.com/questions/21752550/while-importing-mysqldump-file-error-1064-42000-near-at-line-1 client. I'm using mysqldump to take backup with username and password. Following 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 http://stackoverflow.com/questions/8575356/error-while-taking-backup-with-mysqldump-in-mysql-command-line the command seems to be correct, still i'm getting error. Please let me know is there any other way 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 h
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 http://stackoverflow.com/questions/18914935/export-mysql-error-1064-42000-you-have-an-error-in-your-sql-syntax Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like http://forum.centos-webpanel.com/mysql/error-when-importing-mysql-dump-file/ you, helping each other. Join them; it only takes a minute: Sign up Export mysql Error 1064 <42000>: You have an error in your sql syntax up vote 0 down vote favorite I have seen many replies error 1064 to this question, but none of the solutions worked for me, so i am repeating the same question. I am using mysql 5.5.30 on windows xp. I am able to open mysql command line by giving this command: d:\mysql\usr\local\mysql\bin>mysql –uroot –proot But when i use the same username and password to export a database by giving this command: mysql>mysqldump -uroot -proot svga3 > dbsqlfile.sql I GET THIS ERR: Error 1064 <42000>: You have an error error 1064 mysql in your sql syntax: check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysqldump -uroot -proot svga3 > dbsqlfile.sql AFTER seeing many on responses and tried all combinations of the same line, it does't work, need help! Other option tried: mysqldump -u root -p root svga3 > dbsqlfile.sql mysqldump -uroot -p svga3 > dbsqlfile.sql mysqldump -u root -p=root svga3 > dbsqlfile.sql mysqldump -u -p svga3 > dbsqlfile.sql mysql export mysqldump share|improve this question edited Sep 20 '13 at 10:59 luca 1098 asked Sep 20 '13 at 10:51 sridhar s 54411 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted You can't run mysqldump from a mysql shell, it needs to run from the prompt. d:\mysql\usr\local\mysql\bin>mysqldump ... share|improve this answer answered Sep 21 '13 at 9:17 Kyra 1,124156 1 Kyra is right. You can run system commands from within the mysql command-line client using the system command (only on Unix systems) as stated here dev.mysql.com/doc/refman/5.5/en/mysql-commands.html . –wisefish Sep 21 '13 at 10:00 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you a
Print Pages: [1] Author Topic: Error when importing mysql dump file (Read 2860 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: 64 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: 64 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 encodin