Error 1064 42000 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 of this site About
Error 1064 42000 You Have An Error In Your Sql Syntax
Us Learn more about Stack Overflow the company Business Learn more about hiring error 1064 42000 mysql developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join error 1064 sqlstate 42000 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
Error 1064 Mysql 42000 You Have An Error In Your Sql Syntax
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` (`DESCRIPTION`) )
Error 1064 Mysql 42000 Mysql Import
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_character_set utf8 < database1.backup.sql Source:http://nathan.rambeck.o
here for a quick overview of the site Help error 1064 mysql 42000 create table Center Detailed answers to any questions you might have
Error 1064 Mysql 42000 Restore
Meta Discuss the workings and policies of this site About Us Learn more about error 1064 mysql 42000 create database Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask http://stackoverflow.com/questions/21752550/while-importing-mysqldump-file-error-1064-42000-near-at-line-1 Question x 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 ERROR 1064 (42000) at line 38: check the manual that corresponds to your MySQL server http://stackoverflow.com/questions/36632873/error-1064-42000-at-line-38-check-the-manual-that-corresponds-to-your-mysql-s version for the right syntax to use near '// up vote 0 down vote favorite I am trying to run a mysql script on centos. I have following mysql installed. mysql> SHOW VARIABLES LIKE "%version%"; +-------------------------+------------------------------------------------------+ | Variable_name | Value | +-------------------------+------------------------------------------------------+ | innodb_version | 5.6.25-73.1 | | protocol_version | 10 | | slave_type_conversions | | | version | 5.6.25-73.1 | | version_comment | Percona Server (GPL) | | version_compile_machine | x86_64 | | version_compile_os | Linux | +-------------------------+------------------------------------------------------+ My sample script looks like: DELIMITER // DROP TRIGGER IF EXISTS trg_table1_category_insert; DROP TRIGGER IF EXISTS trg_table1_category_update; CREATE TRIGGER trg_table1_category_insert AFTER INSERT ON table1_category FOR EACH ROW BEGIN insert into table1_category_history ( table1_category_history_id, table1_id, transaction_start_date ) values ( new.table1_category_id, new.table1_id, new.create_date ); END; // CREATE TRIGGER trg_table1_category_update AFTER UPDATE on table1_category FOR EACH ROW BEGIN insert into table1_category_history ( table1
log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies http://dba.stackexchange.com/questions/96161/how-to-solve-error-1064-42000 of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; error 1064 it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top How to Solve ERROR 1064 (42000)? up vote 0 down vote favorite DROP PROCEDURE IF EXISTS proc_x; DELIMITER # CREATE DEFINER=`root`@`localhost` PROCEDURE proc_x(sequel CHAR) proc_main:BEGIN SET @SQL = CONCAT(@sequel); PREPARE stmt FROM @SQL; error 1064 mysql EXECUTE stmt; DEALLOCATE PREPARE stmt; END proc_main # Above is a syntax for creating stored procedure in my mysql database. When I execute following statement I get error. CALL proc_x("INSERT INTO tbl_rec(id,name,brnachID) values(10,'Krunal',07)"); Error : ERROR 1064 (42000) at line 93: 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 'NULL' at line 1 Can anyone help me to solve it? Currently I'm using Mysql on UNIX. mysql stored-procedures share|improve this question edited Mar 26 '15 at 3:52 ypercubeᵀᴹ 45k775133 asked Mar 25 '15 at 6:54 Krunal Patel 1116 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote accepted (sequel CHAR) CONCAT(@sequel) @variables are totally independent of non-@ variables. Two fixes needed: SET @SQL = CONCAT(@sequel); --> SET @SQL = sequel; (sequel CHAR) --> (sequel VARCHAR(999)) share|improve this answer answered Mar 25 '15 at 17:04 Rick James 17.5k21230 add a comment| up vote -2 down vote Do you get error for every query or while executing this query only? If you are facing problem executing every