Finding user database table

Finding user database table

by Derrick Mitchinson -
Number of replies: 9

My host did a manual install of Moodle 2.6 for me, but the login information was not sent by email so I can't login.

 

I have PHPMyAdmin access and figured that if I could find the correct bale, I could set the password there, then login normally.  I assumed there would be a table with the name "user", but I find none.  What table will I find my password in??

 

Thanks for the help in advance!!

Average of ratings: -
In reply to Derrick Mitchinson

Re: Finding user database table

by Guillermo Madero -

Hi Derrick,

That would be, mdl_user, unless they used another prefix (e.g. otherprefix_user).

In reply to Guillermo Madero

Re: Finding user database table

by Derrick Mitchinson -

Thanks Guillermo, I assumed I would find a table with that title, but I don't. Here is the end of the table list I see.  I am so confused!

In reply to Derrick Mitchinson

Re: Finding user database table

by Guillermo Madero -

Hi Derrick,

The view is incomplete. There should be a "next page" link or something like that... unless the tables have been deleted or the installation didn't finish sucessfully.

Try the following SQL query:

SELECT * FROM ood_user;
In reply to Derrick Mitchinson

Re: Finding user database table

by Miguel Santos -

the password will be hashed and salted so your best bet is to reset it with the cli tools.

php /path/to/your/moodle/admin/cli/reset_password.php

If you do not have cli access to your server then you can update it in the database.

update mdl_user set password = md5('yourpasswordhere') where username = 'yourusernamehere';

 

In reply to Miguel Santos

Re: Finding user database table

by Derrick Mitchinson -

Hi Miguel, and thanks for the reply!

I went to  http://ciaaa.ca/courses/admin/cli/reset_password.php and it returned "Command line scripts can not be executed from the web interface" I assume that I don't have the cli access you mentioned.

 

Can you possibly provide more detail about how I update the password in the database?  I understand how to modify the line you provided, but I don't know where I need to enter it.

 

Derrick

 

 

In reply to Derrick Mitchinson

Re: Finding user database table

by Guillermo Madero -