Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2004
    Posts
    135

    MySQL Error: #1558 - Column count of mysql.proc is wrong. Expected 20, found 16.

    I am trying to run the following script.

    Code:
    CREATE PROCEDURE sp_select_changelog() 
    BEGIN 
    SELECT * FROM sys_changelog_data; 
    END
    But ended getting the following error message.

    #1558 - Column count of mysql.proc is wrong. Expected 20, found 16. Created with MySQL 50090, now running 50145. Please use mysql_upgrade to fix this error
    I tried mysql_upgrade but getting the following error.

    [root@server mysql]#mysql_upgrade
    Looking for 'mysql' as: mysql
    Looking for 'mysqlcheck' as: mysqlcheck
    sh: -c: line 0: unexpected EOF while looking for matching `''
    sh: -c: line 1: syntax error: unexpected end of file
    Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/tmp/mysql.sock'
    sh: -c: line 0: unexpected EOF while looking for matching `''
    sh: -c: line 1: syntax error: unexpected end of file
    FATAL ERROR: Upgrade failed
    Please help me, I tried a lot of solutions which I can found but no one is helping.
    My English is poor. Please tell me when I make a mistake so that I can improve.

  2. #2
    Join Date
    May 2008
    Location
    Sweden
    Posts
    152
    Kenny,


    First of all, the details you are given is not adequate solve the main issue.

    You are creating a procedure, on which table ?. How you are running the procedure ?.

    If the procedure is just "SELECT * FROM sys_changelog_data; ", Why can't you run it from console rather than creating the Proc.

    Sham
    Linux, C, Perl, Bash, PHP
    MySQL, PostgreSQL
    Postfix, Qmail
    Bind

  3. #3
    Join Date
    Jun 2004
    Posts
    135
    Hi helpyoulinux, thank you for your fast reply.

    First of all, this is just an example script i'm using to create a more complicated group of sql instructions which I have to store it in my database.

    I'm having trouble with creating stored procedure even with a simple empty procedure which they are all returning me the same error.
    My English is poor. Please tell me when I make a mistake so that I can improve.

  4. #4
    Join Date
    Nov 2005
    Posts
    282
    Looks like you need to re-install mysql. Create a backup of your database with mysqldump. The mysql table is a table that is created when mysql is installed and should be edited when you update mysql. What that error means is that your version of mysql is expecting 20 column's in the mysql.proc table, but there are only 16 because your database is operating off of a different version than the mysql program (perhaps because the update was run under a permission set that could not modify the mysql tables). Uninstalling and reinstalling should fix this issue. Hopefully you arnt doing this development on a production server, if you are reinstalling mysql might be a bit more involved.

  5. #5
    Join Date
    Jun 2004
    Posts
    135
    I fixed the problem by downgrading MySQL 5.1 to 5.0, thanks for taking time to help me.
    My English is poor. Please tell me when I make a mistake so that I can improve.

  6. #6
    Join Date
    May 2009
    Posts
    766
    Quote Originally Posted by KennyP View Post
    I fixed the problem by downgrading MySQL 5.1 to 5.0, thanks for taking time to help me.
    I'd hardly call that a "fix." Did you submit a bug report to MySQL?

  7. #7
    Join Date
    Jun 2004
    Posts
    135
    I did not submit any buy report but I found a submitted bug regarding mysql_upgrade error.
    My English is poor. Please tell me when I make a mistake so that I can improve.

Similar Threads

  1. ERROR! MySQL manager or server PID file could not be found ?
    By dungiis in forum Hosting Security and Technology
    Replies: 2
    Last Post: 02-14-2008, 03:23 AM
  2. Installed MySQL in /usr/local/mysql but error in /var/lib/mysql
    By guest3 in forum Hosting Security and Technology
    Replies: 1
    Last Post: 01-21-2007, 06:38 PM
  3. mysql error: c:\mysql\share\charsets\?.conf' not found (Errcode: 2)
    By nocloud in forum Hosting Security and Technology
    Replies: 0
    Last Post: 07-14-2005, 07:46 PM
  4. Replies: 0
    Last Post: 04-30-2005, 05:19 AM
  5. Replies: 5
    Last Post: 05-11-2004, 12:24 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •