Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 827295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:33:10+00:00 2026-05-15T03:33:10+00:00

when trying to create a simple procedure in mysql 5.1.47-community it fails everytime i’ve

  • 0

when trying to create a simple procedure in mysql 5.1.47-community it fails everytime i’ve tried everything!
even simple things like this!

DELIMITER //
CREATE PROCEDURE two ()
begin
SELECT 1+1;
end;
//

The error is

ERROR: Error 1064: 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 ‘mydb’ at line 1

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T03:33:11+00:00Added an answer on May 15, 2026 at 3:33 am

    The error message you’ve given doesn’t correspond to the code you’ve pasted. You’re referring to “mydb” somewhere in the SQL you’re running yet it’s not anywhere in the code you’ve put in the question.

    The code you’ve given should work fine as I see no syntax errors, you may just need to give it a database to work on (“test” in my case here, perhaps it should be “mydb” for you?).

    DELIMITER //
    CREATE PROCEDURE test.two ()
    begin
        SELECT 1+1;
    end;
    //
    
    DELIMITER ;
    
    CALL test.two;
    

    However, I suspect the error you’re getting is become of a line in your SQL that you’re not showing us.

    EDIT
    It could perhaps be the delimiter command. You’re changing the delimiter to // rather than the default ;. So perhaps you’ve run that command (and changed the delimiter for your session to //), and then tried to run USE mydb; where the ; is no longer recognised as a valid delimiter for your session, and that could be giving you the error. Try putting delimiter ; before your use line and see if that helps (and then use it again after you’ve defined your stored procedure so you can call it). This is just a theory though, as I’m not sure of the intricacies of the delimiter command.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a simple BaSH-like grammar on ANTLRv3 but haven't been able
I'm trying to create a simple stored procedure which I can use to write
I'm trying to create a simple report on an intranet site. Based on this
I'm trying to create a simple stored procedure with an if else statement in
I'm trying to create a simple stored procedure which queries a sys.tables table. CREATE
So I am trying to create a real simple dice game...more like a dice
I'm trying to use SharpDX to create a simple maze-like 2D program using DirectX.
I am trying to create a simple dialog in MFC using Visual C++. My
I am trying to create a simple page that enters data in to a
I'm trying to create a simple toggling sidebar using jquery, where it expands and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.