Mysql Error 1307
Updates: Status: Not a Bug Impact on me: None Category:MySQL Server: Stored Routines Severity:S1 (Critical) Version:6.0.3-alpha OS:Linux Assigned to: Tags: 1307 falied procedure View Add Comment Files Developer Edit Submission View Progress Log Contributions [13 Dec 2007 16:07] jey Razack Description: mysql> DELIMITER // mysql> create procedure Test() -> begin -> declare a INT; -> set a = 1; -> select a; -> end -> // ERROR 1307 (HY000): Failed to CREATE PROCEDURE Test How to repeat: DELIMITER // create procedure Test() begin declare a INT; set a = 1; select a; end // DELIMITER ; [13 Dec 2007 17:10] Kevin Lewis Works for me in mysql-6.0-falcon. This has nothing to do with Falcon, so I am changing the category. [13 Dec 2007 18:17] Hakan Küçükyılmaz Jey, thanks for your bug report. But you are missing a semicolon. Please check the documentation. mysql> create procedure Test() -> begin -> declare a INT; -> set a = 1; -> select a; -> end; -> // Query OK, 0 rows affected (0.35 sec) mysql> call Test()// +------+ | a | +------+ | 1 | +------+ 1 row in set (0.00 sec) Query OK, 0 rows affected (0.00 sec) Best regards, Hakan [13 Dec 2007 18:26] jey Razack Hakan, please try in 6.0.3-alpha .. mysql> DELIMITER // mysql> create procedure Test() -> begin -> declare a INT; -> set a = 1; -> select a; -> end; -> // ERROR 1307 (HY000): Failed to CREATE PROCEDURE Test mysql> DELIMITER ; [13 Dec 2007 21:20] Peter Laursen @jey This DELIMITER // create procedure Test() begin declare a INT; set a = 1; select a; end; // works for me with 6.0.4 'falcon preview' build. BTW: unless you change the status from 'not a bug' to 'open' I do not think you should expect any feedback (I am not a mysql person)! [13 Dec 2007 21:23] Peter Laursen btw ... this "DELIMITER //" has one additional space, try "DELIMITER //" .. because if you don't DELIMITER is (probably) " //" and not "//" .... [13 Dec 2007 21:27] jey Razack Thanks Peter, I will try to install 6.0.4 (preview). Regards..Jey [4 Nov 2008 7:48] Jose Fradejas DELIMITER // CREATE PROCEDURE p22 (parameter1 INT) BEGIN DECLARE EXIT HANDLER FOR 1452 INSERT INTO error_log VALUES (CONCAT ('Time: ',current_date,'. Foreign Key Reference Failure For Value = ',parameter1)); INSERT INTO t3 VALUES (parameter1); END; ERRO
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > MySQL Error: #1307 - Failed to CREATE PROCEDURE Want to Advertise Here? Solved MySQL Error: #1307 - Failed http://bugs.mysql.com/33219 to CREATE PROCEDURE Posted on 2009-03-28 MySQL Server 1 Verified Solution 11 Comments 3,443 Views Last Modified: 2012-05-06 I'm trying to create a procedure using the same syntax successfully used on a different server with the same version of MySQL. This is a new LAMP server (CentOS 5.2) so mysql may not be configured correctly. I've checked the https://www.experts-exchange.com/questions/24274098/MySQL-Error-1307-Failed-to-CREATE-PROCEDURE.html permissions in /var/lib/mysql and they look fine. What configuration options might I need to change? I've read some suggestions that mysql be reinstalled. I'd rather not do that obviously, but if I must, how can I do this in a thorough manner? Thanks for any feedback. 0 Question by:SummitDan Facebook Twitter LinkedIn Google Best Solution bySummitDan I had to use the \W option at the MySQL command line in order to see the warning, which was that the comments for the supplied routines were too long. Deleting the comments solved the problem. This Go to Solution 11 Comments LVL 20 Overall: Level 20 MySQL Server 5 Message Expert Comment by:Gawai2009-03-28 check if there is something in Error log 0 LVL 1 Overall: Level 1 Message Expert Comment by:dmonzon2009-03-28 verify your servers (MySQL,PHP, etc) versions or post your code 0 LVL 14 Overall: Level 14 MySQL Server 13 Message Expert Comment by:racek2009-03-29 http://forums.mysql.com/read.php?25,183145,184291#msg-184291 0 Message Author Comment by:SummitDan2009-03-30 I'm having trouble finding the error log. According to http://dev.mysql.com/doc/refman/5.1/en/error-log
diagnostic query first: SELECT IF( COUNT(*) XOR (CAST(VERSION() AS decimal(2, 1)) >= 5.1), 'Wrong mysql.proc table version. Did you forget to run mysql_upgrade?', 'The mysql.proc table looks ok. Keep hunting.' ) AS http://thenoyes.com/littlenoise/?p=80 troubleshooting FROM information_schema.columns WHERE table_schema = 'mysql' AND table_name = 'proc' AND column_name https://solaajayi.wordpress.com/2011/10/23/error-1307-hy000-at-line-31-failed-to-create-procedure/ LIKE 'body_utf8'; Share this:TweetMoreShare on TumblrPocket Filed under: MySQL FAQ Leave a comment Comments (5) Trackbacks (0) ( subscribe to comments on this post ) PatrickDecember 21st, 2009 - 22:47 Do you have any other information? I am experiencing this same behavior on mysql 5.0.45. when I run mysql_upgrade, I get no change in behavior. mysql error snoyesDecember 22nd, 2009 - 21:34 Find somebody who can create procedures with the same version as you, and check that the output from SHOW CREATE TABLE mysql.proc; is the same on both. Perhaps you've somehow run the 5.1 version of mysql_upgrade. DarrylJanuary 22nd, 2010 - 09:06 I had this problem. I'm on Windows, so adjust for *nix OS. I went to MySQL bin folder, and ran: mysql_upgrade -u root mysql error 1307 -p Entered the password and the upgrade script ran and fixed the problem. HTH, Darryl BobSeptember 17th, 2010 - 03:40 Upgraded from previous version to 5.1.x Adding a sinple procedure failed with error 1307 running /usr/bin/upgrade_mysql -uroot solved the problem Thanks Steve MorganMay 28th, 2011 - 05:10 If you get an error running this ensure you start CMD as root. Leave a comment Cancel reply Name (required) Email (required) Website Notify me of follow-up comments by email. Notify me of new posts by email. No trackbacks yet. errno: 121 (Duplicate key) with CREATE TABLE » « Location, location, location Archives Archives Select Month September 2016 June 2016 November 2015 October 2015 August 2015 April 2015 March 2015 November 2014 October 2014 April 2014 September 2013 July 2013 April 2013 February 2013 October 2012 September 2012 December 2011 November 2011 October 2011 March 2011 August 2010 March 2010 February 2010 January 2010 December 2009 November 2009 July 2009 June 2009 April 2009 February 2009 December 2008 November 2008 October 2008 September 2008 August 2008 April 2008 November 2007 October 2007 July 2007 April 2007 March 2007 February 2007 November 2006 October 2006 September 2006 August 2006 July 2006 June 2006 November 2005 Categories Habitat Kids
It Are you poor, brokenheated, captive, or blind or bruised? You are in LUCK! God Loves YOU!!! God searches the Heart and Mind of Man Top Posts Beginners guide to consuming a web service using PHP SoapClient Internet Service Plans In Nigeria with Pricing, Validity, Data Cap, and Activation Codes Installing SmartGit 2.01 on Ubuntu Linux 10.04 How to create personalized PDF Templates using TCPDF and FPDI Connecting to MySQL using PyQt Installing FFMPEG the Easy Way on OpenSuSE 11.1 Categories Faith General Git Life Linux MySQL PHP Postgres Python Django PyQt Tags3g 3.5g Adobe Air Android Apache apple assertive assertiveness AWS bash beginners browsing cdma1 cdma one certificate commit continuous delivery continuous integration CSR easy evdo General git gitosis godaddy gui how to howto hsdpa hsupa ignore install internet internet access introduction iPad iPhone iTunes Key Linux msysgit mtn multilinks nested git repositories New Stuff novicem dummies openssl pair programming php pull push remote secure setup simple smartgit SOAP SoapClient SSL starcomms submodule suse 11.1 SuSE Linux TDD test-driven development tutorial ubuntu unit testing unit tests version control Weather web service Wildcard Windows Phone 8 WSDL zainRecent Comments Ajayi Oluwaseun Emma… on Connecting to MySQL using PyQtManas on Beginners guide to consuming a…sajayi on God searches the Heart and Min…Dwaine Evans Sr on God searches the Heart and Min…sajayi on Wow! It's been an emotio… sajayi Do not grieve the Holy Spirit. Walk in Obedience to Him solaajayi.wordpress.com/2016/05/11/do-… 5monthsago Write the Laws of God in Your Hearts! solaajayi.wordpress.com/2016/04/18/wri… 6monthsago Believe You Have Already Received It solaajayi.wordpress.com/2016/04/15/bel… 6monthsago Are you poor, brokenheated, captive, or blind or bruised? You are in LUCK! God Loves YOU!!! solaajayi.wordpress.com/2016/04/14/are… 6monthsago God Judges the Sins of the Heart and Mind solaajayi.wordpress.com/2016/04/04/god… 6monthsago Archives May 2016(1) April 2016(4) February 2016(1) December 2015(1) December 2014(1) December 2013(2) August 2012(2) May 2012(1) April 2012(3) December 2011(3) October 2011(4) September 2011(1)