3

Good Afternoon.

Im trying to recover admin login information for a website I have recently taken on, however there is no craft_users table within the database. Any help to locate the user info would be greatly appreciated.

2 Answers 2

5

There are so many tables that phpMyAdmin paginates them. All the tables that came after craft_tags alphabetically are on the second page, making it look like there is no craft_users table. Pagination controls are at the top:

craft_users is on the second page

Reason I know? I just made the same mistake.

1
  • You saved my day! PMA UX is horrible! Although, resetting users can now be done with the craft console easily Commented Jan 17 at 23:31
2

A Craft website can be configured to have a different table prefix. This can be updated in the craft/config/db.php file:

In this example, the prefix is the default, craft, so the users table will be craft_users

return array(
    '*' => array(
        'tablePrefix' => 'craft',
    )
);

In this example, the prefix is unexpected so the users table will be unexpected_users

return array(
    '*' => array(
        'tablePrefix' => 'unexpected',
    )
);

In this example, the prefix is (blank) so the users table will be users

return array(
    '*' => array(
        'tablePrefix' => '',
    )
);
5
  • Hi thanks for the quick response. The database is using craft_ as the prefix. There is just no users table there at all. ive clicked into each table in phpmyadmin and none seem to be a users one. Is it possible to have users on the dev site, but launch the finished site without user access, either for security or so that only the dev team can alter? Commented Oct 19, 2017 at 14:09
  • The db.php file will also probably show you the name and connection info of the DB Craft is connecting to. Maybe the one you are looking for is in a different location? I don't believe Craft support s have some DB tables in other places Commented Oct 19, 2017 at 14:36
  • Db.php confirms that the database it is connecting to is the correct one im looking at. Id just doesnt have a users table. If I were to create one, would this work? Commented Oct 19, 2017 at 15:01
  • 2
    If there isn't a users table then the Craft installation is broken and won't work anyway.
    – Brad Bell
    Commented Oct 19, 2017 at 15:45
  • H Brad. The webste s working in general. But ive just set up a new test site and that doesnt have anythng in the users group table that relates to the admin user Commented Oct 21, 2017 at 12:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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