1

After installing Drupal 7, the site seems to run fine, however looking in phpMyAdmin I don't see a "node" table. According to this image, used from the documentation on Drupal.org, it should have that table.

screenshot

When I try to run various SQL queries that mention the "node" table they fail. However the Views module shows Drupal apparently internally able to query against the "node" table.
Also, using a raw SQL module I am able to write SQL against node.title, for example. However, it fails from phpMyAdmin.

I notice that Drupal 8 installations on the same server seem to have a node table. If it's relevant, these were all installed with Softaculous on Arvixe.

What is going on here?

0
3

Yes, drupal 7 does have a node table. The reason why your database does not might be either because you are looking at the wrong database or perhaps because your configuration are using a database prefix. Look in your sites/default/settings.php file and check if you are using a prefix. For example:

$databases['default']['default'] = array(
  'driver' => 'mysql',
  'host' => 'localhost',
  'database' => 'example',
  'username' => 'user',
  'password' => 'password',
  'prefix' => 'd7_',
);

or

$databases['default']['default'] = array(
  'driver' => 'mysql',
  'host' => 'localhost',
  'database' => 'example',
  'username' => 'user',
  'password' => 'password',
  'prefix' => array(
    'node' => 'd7_',
  )
);

The first example would prefix all tables in the database with d7_, while the second would only change the name of the node table.

4
  • Thank you for your answer. I just checked and can confirm that I am looking at the correct database. The database does use a prefix for all tables. I am looking again now and don't see a table for node even including the prefix. Looking at the database in phpMyAdmin, I see that the last table starts with "f", so I wonder if it didn't install or isn't loading the full list? (Although again the site seems to run fine.) Another idea that crossed my mind is that somehow it may have installed with permissions such that I can't see the table, although that doesn't seem likely. – Eagle Gamma Aug 9 '17 at 17:22
  • 1
    OK, looking further I see that while the table (along with others) does not show up in the tree in the left column of phpMyAdmin, it does show up when I browse the database in the right column of phpMyAdmin. I'm not sure whether that's a bug or expected behavior in phpMyAdmin. Furthermore, with the prefix for all the tables, my queries on "node" without prefix didn't find the table, while presumably Drupal automatically adds the prefix. Together that combination made it look to me like there perhaps wasn't a "node" table when there is. Thank you again! :) – Eagle Gamma Aug 9 '17 at 17:30
  • @EagleGamma - You're welcome. Glad you solved it. – Cyclonecode Aug 9 '17 at 19:14
  • Phpmyadmin does sometimes paginate tables in the left-hand frame. – Pog Le Pog Aug 15 '17 at 18:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.