in reply to Connecting to mySQL using DBIx::Recordset - table name upper case problem

Table names in MySQL are case sensitive.
update Only on Unix machines. Windows servers don't enforce this. Thanks to PodMaster for reminding me.

'Users' is different from 'users' or 'USERS'. Check the real name for that table before running your script.

That said, make sure that you can connect to that table using any other means, i.e. the standard MySQL command line client or the MySQL Control Center.

The database server tells you that a table does not exist in two cases: (1) when the table is not there and (2) when you are not authorized to see it. The error messages should be different, though. Check also if the return message is the one generated by the database server or it is coming from an intermediate wrapper.

You may try to access using the plain DBI
#!/usr/bin/perl -w use strict; use DBI; my $database_name = "mydb"; my $user = 'I_am'; my $password = "smart"; my $url="db.strangehost.com"; my $dbh=DBI->connect("dbi:mysql:$database_name;host=$url", $user,$password, {RaiseError=>1}); for ($dbh->tables) { print "$_\n"; } $dbh->disconnect();
This script will give you the list of tables you are authorized to see in that database.
_ _ _ _ (_|| | |(_|>< _|

Replies are listed 'Best First'.
Re: Re: Connecting to mySQL using DBIx::Recordset - table name upper case problem
by Heidegger (Hermit) on Jan 27, 2003 at 10:44 UTC
    Thanks for your help, I solved my problem by setting the following variable:
    $DBIx::Recordset::PreserveCase = 1;