Trevor Price | 18 Jun 2005 02:08

DBD make test failure


Hello,

	Make test fails .  Below are the requisite stats.

Mysql : 5.0.7
OS : Redhat Linux ES 3.0 ( taroon update 4 )
Perl dBI : 1.41
Mysql DBD : 2.9007
Perl : 5.8.0

Rpms installed

MySQL-shared-standard-5.0.7-0.rhel3
MySQL-server-standard-5.0.7-0.rhel3
MySQL-client-standard-5.0.7-0.rhel3
MySQL-shared-compat-5.0.4-0
MySQL-devel-standard-5.0.7-0.rhel3

I have read the known problems.  Based upon the known problems I tried

Perl Makefile.PL -libs="-L/usr/lib
-L/usr/lib/gcc-lib/i386-redhat-linux/3.2.3 -L/usr/lib/mysql
-lmysqlclient -lz -lcrypt -lnsl -lm"

The first two paths listed are an attempt to fix the libggc.a problem
and the libmysqlclient.so problem.  However each addition when applied
individually changed nothing. I thought the redhat specific rpms would
help the installation of DBD which has always presented a problem.  Here
is a sampling of the make test failures.
(Continue reading)

Dave Howorth | 21 Jun 2005 10:50
Picon
Picon

DBD::mysql anonymous user problem

I'm trying to upgrade DBD::mysql and having trouble with the anonymous 
user for the test database. When I run the install the tests fail with 
messages like:

   DBI connect('test','',...) failed: Access denied for user:
   'root <at> localhost' (Using password: NO) at t/50chopblanks.t line 57
   Cannot connect: Access denied for user: 'root <at> localhost' (Using
   password: NO)
         Either your server is not up and running or you have no
         permissions for acessing the DSN DBI:mysql:test.
         This test requires a running server and write permissions.
         Please make sure your server is running and you have
         permissions, then retry.

According to the mysql manual:

"The DBD::mysql installation runs a number of tests. These tests require 
being able to connect to the local MySQL server as the anonymous user 
with no password. If you have removed anonymous accounts or assigned 
them passwords, the tests fail."

I haven't changed the anonymous user accounts AFAIK. I did add some 
extra accounts. My mysql.user table  looks like this:

mysql> select host,user,password,select_priv from user;
+--------------------+----------------+------------------+-------------+
| host               | user           | password         | select_priv |
+--------------------+----------------+------------------+-------------+
| localhost          | root           | 5b3e0551192fc0ec | Y           |
| suse3.lmb.internal | root           | 5b3e0551192fc0ec | Y           |
(Continue reading)

Rudy Lippan | 21 Jun 2005 14:42

Re: DBD::mysql anonymous user problem

On Tue, 21 Jun 2005, Dave Howorth wrote:

> I'm trying to upgrade DBD::mysql and having trouble with the anonymous 
> user for the test database. When I run the install the tests fail with 
> messages like:
> 
>    DBI connect('test','',...) failed: Access denied for user:
>    'root <at> localhost' (Using password: NO) at t/50chopblanks.t line 57
>    Cannot connect: Access denied for user: 'root <at> localhost' (Using
>    password: NO)
>          Either your server is not up and running or you have no
>          permissions for acessing the DSN DBI:mysql:test.
>          This test requires a running server and write permissions.
>          Please make sure your server is running and you have
>          permissions, then retry.

Did you set the username and password when you ran Makefile.PL?

-r

--

-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules <at> m.gmane.org

Dave Howorth | 21 Jun 2005 15:27
Picon
Picon

Re: DBD::mysql anonymous user problem

Rudy Lippan wrote:
> On Tue, 21 Jun 2005, Dave Howorth wrote:
> 
>>I'm trying to upgrade DBD::mysql and having trouble with the anonymous 
>>user for the test database. When I run the install the tests fail with 
>>messages like:
>>
>>   DBI connect('test','',...) failed: Access denied for user:
>>   'root <at> localhost' (Using password: NO) at t/50chopblanks.t line 57
> 
> Did you set the username and password when you ran Makefile.PL?

No. I should have mentioned that I'm using CPANPLUS for the install so 
there's no opportunity to interact. If I run the tests manually, I can 
edit mysql.mtest to the user 'test' that I added, but I don't understand 
why the default CPAN installation isn't working. I thought it was all 
supposed to default to the anonymous user?

Thanks, Dave

--

-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules <at> m.gmane.org

Dave Howorth | 21 Jun 2005 16:45
Picon
Picon

Re: DBD::mysql anonymous user problem

Jochen Wiedmann wrote:
> On 6/21/05, Dave Howorth <dhoworth <at> mrc-lmb.cam.ac.uk> wrote:
> 
>>No. I should have mentioned that I'm using CPANPLUS for the install so
>>there's no opportunity to interact. If I run the tests manually, I can
>>edit mysql.mtest to the user 'test' that I added, but I don't understand
>>why the default CPAN installation isn't working. I thought it was all
>>supposed to default to the anonymous user?
> 
> There is a possibility to interact, which was designed spefically with
> CPAN installations in mind: Write your own "mysqlconfig". Should be
> documented in the INSTALL section.

Well after having cpan run and then going back and investigating what 
went wrong, you can change something. But mysql_config is already 
installed in /usr/bin by SuSE so that's not really something that should 
be edited by a user. There should be something elsewhere in a 
user-alterable part of the file system, which is why I bodged it by 
editing mysql.mtest.

But my main issue is that none of this should be necessary. It should 
just install automatically using the default mysql anonymous accounts. 
Why is that not working?

Thanks and regards,
Dave

--

-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
(Continue reading)

Steve Hay | 21 Jun 2005 17:56

[PATCH] Fix bind_param() bug in DBD-mysql-2.9008

Hi all,

DBD-mysql-2.9007 introduced a fix for a bug that I had reported, in 
which non-numeric values bound to numeric types could break the SQL by 
placing arbitrary unquoted strings into the SQL.

However, the bug fix seems to have a problem of its own -- it prevents 
you from using the value "undef" in such places.  AFAIK this use of 
"undef" is a perfectly valid way of setting the value of a numeric 
column to NULL, so should not be prevented from running.

Attached is a short test program that illustrates the problem.  Using 
2.9008 this outputs

ROW 1: 1, 1
DBD::mysql::st bind_param failed: Binding non-numeric field 1, value 
undef as a numeric! at C:\Temp\dbi.pl line 29.

Attached is also a patch against 2.9008 that fixes this.  With the 
patch, the test program now correctly outputs

ROW 1: 1, 1
UPDATE affected 1 rows
Use of uninitialized value in join or string at C:\Temp\dbi.pl line 38.
ROW 1: 1,

A new release with this patch in place would be appreciated as this is 
quite an issue for me.  My database code makes frequent use of NULL'ing 
numeric columns by this means, and is completely broken with the current 
release :-(
(Continue reading)

Patrick Galbraith | 21 Jun 2005 18:04
Picon
Favicon

Re: [PATCH] Fix bind_param() bug in DBD-mysql-2.9008

Steve,

I'm working on another release as we speak, and will take a look at 
including this patch, of course after testing ;)

Kind regards,

Patrick

On Jun 21, 2005, at 5:56 PM, Steve Hay wrote:

> Hi all,
>
> DBD-mysql-2.9007 introduced a fix for a bug that I had reported, in
> which non-numeric values bound to numeric types could break the SQL by
> placing arbitrary unquoted strings into the SQL.
>
> However, the bug fix seems to have a problem of its own -- it prevents
> you from using the value "undef" in such places.  AFAIK this use of
> "undef" is a perfectly valid way of setting the value of a numeric
> column to NULL, so should not be prevented from running.
>
> Attached is a short test program that illustrates the problem.  Using
> 2.9008 this outputs
>
> ROW 1: 1, 1
> DBD::mysql::st bind_param failed: Binding non-numeric field 1, value
> undef as a numeric! at C:\Temp\dbi.pl line 29.
>
> Attached is also a patch against 2.9008 that fixes this.  With the
(Continue reading)

Michael Stassen | 21 Jun 2005 19:38
Picon

Re: DBD::mysql anonymous user problem

Dave Howorth wrote:
 > I'm trying to upgrade DBD::mysql and having trouble with the anonymous
 > user for the test database. When I run the install the tests fail with
 > messages like:
 >
 >   DBI connect('test','',...) failed: Access denied for user:
 >   'root <at> localhost' (Using password: NO) at t/50chopblanks.t line 57
 >   Cannot connect: Access denied for user: 'root <at> localhost' (Using
 >   password: NO)

Look at the error message.  The tests are attempting to log into mysql as user 
root <at> localhost with no password.

<snip>
 > According to the mysql manual:
 >
 > "The DBD::mysql installation runs a number of tests. These tests require
 > being able to connect to the local MySQL server as the anonymous user
 > with no password. If you have removed anonymous accounts or assigned
 > them passwords, the tests fail."

This is from <http://dev.mysql.com/doc/mysql/en/perl-installation.html>.

The manual is wrong.  By default, the tests do not specify the user or 
password.  With neither specified, mysql will use defaults.  If the current 
unix user (when using CPAN, this is usually root, as in your case) exists as 
user <at> localhost in mysql, that is the default.  If user <at> localhost does not 
exist, then the anonymous user, '' <at> localhost, is the next option, if it exists.

 > I haven't changed the anonymous user accounts AFAIK. I did add some
(Continue reading)

Renee Halbrook | 22 Jun 2005 18:51
Picon
Favicon

longblob insert question

Hi,
I am trying to insert a longblob (in this case a
string of characters) into a table, using perl:dbi . 
The mysql instance is located on a solaris box.

My load script keeps failing, I get a the following
error:

Got a packet bigger than 'max_allowed_packet'! at
DataAccessObject.pm line 1063.

I changed the max_allowed_packet size in the my.cnf
file to 1 G, but that didn't fix the problem.

I am doing a standard insert :
like : (simplified)
"insert into feature (sequence) values (?)";

my $sequence = $featuretable->sequence();

    $insert->bind_param( 1, $sequence );

I wonder if there is some sort of append function, or
a way to divide the data stream into chunks? Or should
I store the chunks in a temporary table and try to
merge them later?

I would really appreciate any guidance on this issue.

Regards,
(Continue reading)

Dave Howorth | 23 Jun 2005 13:16
Picon
Picon

Re: DBD::mysql anonymous user problem

Michael Stassen wrote:
> Dave Howorth wrote:
>  > I'm trying to upgrade DBD::mysql and having trouble with the anonymous
>  > user for the test database. When I run the install the tests fail with
>  > messages like:
>  >
>  >   DBI connect('test','',...) failed: Access denied for user:
>  >   'root <at> localhost' (Using password: NO) at t/50chopblanks.t line 57
>  >   Cannot connect: Access denied for user: 'root <at> localhost' (Using
>  >   password: NO)
> 
> Look at the error message.  The tests are attempting to log into mysql 
> as user root <at> localhost with no password.

Hi Michael,

OK, I'm with you so far ...

> <snip>
>  > According to the mysql manual:
>  >
>  > "The DBD::mysql installation runs a number of tests. These tests require
>  > being able to connect to the local MySQL server as the anonymous user
>  > with no password. If you have removed anonymous accounts or assigned
>  > them passwords, the tests fail."
> 
> This is from <http://dev.mysql.com/doc/mysql/en/perl-installation.html>.
> 
> The manual is wrong.

(Continue reading)


Gmane