List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:October 20 1999 7:57pm
Subject:Unknown MySQL Error
View as plain text  
>>>>> "Kinney" == Kinney Baughman <baughmankr@stripped> writes:

Kinney> Hi,
Kinney> I've just moved an existing MySQL database from one commercial server to
Kinney> another, SiteHost4u, for one of my clients.

Kinney> According to the login, my server host is running:

Kinney>     Your MySQL connection id is 3980 to server version: 3.21.33-log

Kinney> I'm in the process of testing my perl scripts.  But each time I run
Kinney> them, I get the following message:

Kinney> Mysql's message: Unknown MySQL error at showprodthumb.cgi line 24,
Kinney> <STDIN> chunk 1.

Kinney> The offending lines of code look like this:

Kinney> ---------------
Kinney> #!/usr/bin/perl

Kinney> use CGI;
Kinney> use Mysql;

Kinney> # Setup main program
Kinney> my $query = new CGI;

Kinney> # Print out a content-type for HTTP/1.0 compatibility
Kinney> print $query->header("text/html");

Kinney> # Grab the values from the form

Kinney> my $sid = $query->param("sid");

Kinney> my $servername="";
Kinney> my $username="";
Kinney> my $password="";

Kinney> $servername = "fairfieldchair.com";
Kinney> $username = "myusername";
Kinney> $password = "mypassword";

Kinney> my $dbh = Mysql->connect($servername,$username,$password); #line 24
Kinney> --------

Kinney> I've searched the mailing list archives.  All I found there that might
Kinney> speak to my problem were suggestions to upgrade past MySQL 3.21.33. 
Kinney> That's going to be tough for me in this situation since I'm not in
Kinney> command of the server.

Hi!

It looks like you have found a bug in the MySQL server/client protocol
It should be backward compatible against all previous releases, but...

Have you tried to connect to this server with a 'new' mysql client,
like mysqladmin.  Does this work?

You have basicly two options:

- Relink perl with the the client libraries from 3.21
- Try to find the bug in the MySQL client library.

It's the following code in client/libmysq.c that should handle the
main difference between the old and new clients:

      char *pos=(char*) net->read_pos+1;
      if (mysql->protocol_version > 9)
      {                                         /* New client protocol */
        net->last_errno=uint2korr(pos);
        pos+=2;
        len-=2;
      }
      else
      {
        net->last_errno=CR_UNKNOWN_ERROR;
        len--;
      }

Regards,
Monty
Thread
Unknown MySQL ErrorKinney Baughman20 Oct
  • Unknown MySQL ErrorMichael Widenius20 Oct