I attached two screen shots. One showing the errors:

# user warning: SELECT command denied to user 'lllofil_lllofil'@'localhost' for table 'COLUMNS' query: SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA="lllofil_drupaltest" ORDER BY TABLE_NAME, ORDINAL_POSITION in /home/lllofil/public_html/drupal/sites/devaltestmy.lllofil.org/modules/schema/engines/schema_mysql.inc on line 100.
# user warning: SELECT command denied to user 'lllofil_lllofil'@'localhost' for table 'STATISTICS' query: SELECT * FROM information_schema.STATISTICS WHERE TABLE_SCHEMA="lllofil_drupaltest" ORDER BY TABLE_NAME, INDEX_NAME, SEQ_IN_INDEX in /home/lllofil/public_html/drupal/sites/devaltestmy.lllofil.org/modules/schema/engines/schema_mysql.inc on line 145.
# Could not analyze externalleaderdatawid (connection default)

and warnings

    * externalleaderdatawid analyzed
    * externalleaderdatawid has no primary key defined. A single-field primary key is necessary to use this table as the base table for a view.

and another screen shot showing the structure of my imported table, after I edited they types and picked the id field as the primary key.

This table was imported from a comma deliminated csv file, the data looks fine in the phpmyadmin browser. All tables are prefixed (set in the site settings.php file).

I checked that the user has "all permissions". I dont know why it says browse is not allowed. Also, it has a primary key, so I dont know why it says I need one still.

This is my first try with these modules.

I have table wizard 6.x-1.0-rc1 (May 3, same as the May 3 dev?)
Schema 6.x-1.3
Migrate 6.x-1.x-dev (April 16 the most recent)

Please let me know what I might do to get it to analyze my table.
I want to be able to use the data in there to create users and fill in content profile nodes using the data and also fill in location cck fields with it too.

Thanks!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

YesCT’s picture

Title: after import csv, after add primary key in phpadmin: error "has no primary key defined" and "SELECT command denied to user" » bounty: after import csv after add primary key in phpadmin: error "has no primary key defined" & "SELECT command denied to user"

I posted a bounty for getting this cleared up. :) Thanks!
http://drupal.org/node/454906

mikeryan’s picture

Title: bounty: after import csv after add primary key in phpadmin: error "has no primary key defined" & "SELECT command denied to user" » "SELECT command denied to user" when analyzing table
Category: bug » support

The MySQL message is telling you that user lllofil_lllofil does not have permission to query the column information. If you go into phpMyAdmin logged in as that user and try executing

SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA="lllofil_drupaltest"

you should see the same message. The Table Wizard message that no primary key is defined is a consequence of that - because the analysis failed, it has no way of knowing about the primary key.

YesCT’s picture

Thanks for confirming what I suspected... that I am setting the primary key ok, but that the other error is causing it to look like no primary key is set!

YesCT’s picture

I ran the command:
SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA="lllofil_drupaltest"

And got:

Error

SQL query: Documentation

SELECT *
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = "lllofil_drupaltest"
LIMIT 0 , 30

MySQL said: Documentation
#1142 - SELECT command denied to user 'lllofil'@'localhost' for table 'COLUMNS' 

At the top of the window it also says:

  Server: localhost  -   Database: information_schema  -   Table: COLUMNS 

But I dont have a database named information_schema
my database is lllofil_drupaltest

is there a bug? maybe the select command being issues is not correct in the code?

YesCT’s picture

YesCT’s picture

looks like information_schema is something special:
http://dev.mysql.com/doc/refman/5.0/en/information-schema.html
And on the hosting provider this site is on, I dont have access to that.
I'm going to try doing the data import/migrate/table wizard stuff on my local mamp, and then after the data is in, upload it back.

mikeryan’s picture

Status: Active » Closed (fixed)
aendra’s picture

I have this same issue; is there any sort of workaround for us without access to the information_schema table? Thanks!

birdonwire’s picture

I had the same problem was solved by the following
the original query was
select * from schema.table where ....

i made it to be
select * from table where ....

and it worked fine