Could not create guest user record !!!

Could not create guest user record !!!

by Youssef Kassab -
Number of replies: 22

hi, i am getting this error message when trying to login, can anyone help please?

thanks

youssef kassab

Average of ratings: -
In reply to Youssef Kassab

Re: Could not create guest user record !!!

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Youssef,

It may be the case that the database table mdl_user needs repairing. Assuming you have phpMyAdmin, this may be done as follows:

Click the SQL tab, then in the "Run SQL query/queries on database moodle" field type REPAIR TABLE mdl_user and click the Go button.
Average of ratings: Useful (1)
In reply to Helen Foster

Re: Could not create guest user record !!!

by Youssef Kassab -
thanks helen, i tried it and it worked. do you know what is the reason of this problem?
In reply to Youssef Kassab

Re: Could not create guest user record !!!

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Youssef,

Thanks for your feedback - it's good to know your problem is solved. Sorry, I don't know the exact cause of your problem - there are probably a number of possibilities. I wouldn't worry unless it happens again.
In reply to Helen Foster

Re: Could not create guest user record !!!

by Youssef Kassab -
Thank you again and hope the problem won't happen again
In reply to Helen Foster

Ynt: Re: Could not create guest user record !!!

by Mehmet Tuncel -
i have too the problem.
i meet this problem while i want to new installation.

(Apache 2.2.4, PHP 6.0, MYSQL 5.0 and Moodle 1.8.1)
In reply to Helen Foster

Re: Could not create guest user record !!!

by David Haddad -

How do you login to myphpadmin?

Thanks.

David

In reply to David Haddad

Re: Could not create guest user record !!!

by Mathieu Petit-Clair -
Picture of Core developers Picture of Moodle HQ Picture of MoodleCloud team Picture of Plugin developers Picture of Testers
The specific location of phpmyadmin depends on your server configuration. If you don't know, I guess your sysadmin is the next best person to ask.

On Debian servers, it can be found on http://localhost/phpmyadmin (I don't think it's available remotely by default). For other configurations, you'll have to give us a lot more information, or ask your sysadmin.

I hope this helps a bit,

Mathieu
In reply to Mathieu Petit-Clair

Re: Could not create guest user record !!!

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I just added phpmyadmin on my Ubuntu box with:

sudo apt-get install phpmyadmin

It installed fine and looks like you can access it on the LAN with http://<ip-address>/phpmyadmin/ by default...

Very useful... I think I will add it to my MySQL server when I get back to work tomorrow! smile
In reply to David Haddad

Re: Could not create guest user record !!!

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi David,

If phpMyAdmin is installed in the moodle/admin folder (as described for MySQL Admin 2.11.5.1), your site admin block will include a database link in the server folder for easy access to phpMyAdmin.
In reply to Helen Foster

Re: Could not create guest user record !!!

by Che Lu -
I had the same problem and your suggestion worked. Thank you very much! I'm glad I found this solution! smile
In reply to Helen Foster

Re: Could not create guest user record !!!

by Martin F -
Thanks!! Help me out too , and it was so quick.
In reply to Helen Foster

Re: Could not create guest user record !!!

by Dhrubajyoti Doley -
Hi Helen Foster,

Thanks a Lot, it works perfectly fine!

Dhrubajyoti Doley (India)
In reply to Helen Foster

Re: Could not create guest user record !!!

by Preshentha Naidoo -
Good Day Helen

Please explain me as to how i go and Click the SQL tab, then in the "Run SQL query/queries on database moodle" field type
REPAIR TABLE mdl_user
and click the Go button.

Is there any coding that i need.
I have never worked with Moodle before ,I know how to login into phpMyAdmin but i am not sure what to do there after please explain,Thank You.

Regards
Preshentha
In reply to Helen Foster

Re: Could not create guest user record !!!

by Buddy King -

Hi!

Brainlock over "Could not create guest user record !!!" issue.  I am using moodle for windows 1.9.5 stable. The problem is that if I cannot login to moodle using the regular login screen how could I use the REPAIR TABLE mdl_user command. Is there a different procedure to login for solving this problem or I need to install some extra software for that.!

I'd really appreciate your help in this respect. 

Thank you.

Syed

In reply to Buddy King

Re: Could not create guest user record !!!

by Marius Pretorius -
I've just had the same problem. I used the solution as described above. It worked perfectly!

Probably this is too late to solve your problem. Moodle runs on a server that has MySQL installed. You need to access the MySql database on your server. This is not from within Moodle. You need to have phpMyAdmin installed in order to utilise the solution posted above. You will probably be able to log in by typing //localhost/phpmyadmin in the URL box of your browser, if you are working on the server. Otherwise just replace "localhost" with the name of your server. You will need the User Name and Password for the MySql database.
In reply to Marius Pretorius

Re: Could not create guest user record !!!

by Noveck Gowandan -
In order to prevent or minimize this from happening, I chose to script a nightly optimize and repair of my Mysql DB.

I simply setup a cronjob nightly to execute the following:

mysqlcheck dbname -c -o -a -r -f -h localhost -u root -pyourpassword

see here for all the switches:
http://linuxcommand.org/man_pages/mysqlcheck1.html


Cheers,
-n
In reply to Marius Pretorius

Re: Could not create guest user record !!!

by Buddy King -

Hi!

Thank you for your reply.  I too mangaged to solve this problem the second time using the same procedure. But, only after crashing my database and a fresh installation.  I wish I'd have got your reply earlier. 

Anyways thanks.

In reply to Helen Foster

Re: Could not create guest user record !!!

by Pandish R -

Hi..

    I too have this problem. moodle.mdl.user table showing repair and this table read only, how to solve this problem. I couldn't add new user and couldn't update old user's details anything. Please give me the suggetions..

 

  Thanks.. smile

In reply to Helen Foster

回复: Re: Could not create guest user record !!!

by 佳波 钱 -
it not work

"The storage engine for the table doesn*t support repair"

In reply to 佳波 钱

Re: Could not create guest user record !!!

by Guillermo Madero -

Hi 佳波 钱,

A few tips:

1. Trying to get useful info from very old threads doesn't tend to work. That advice was given six years ago (and the original post is an eight year old one!) and it was intended for a MySQL MyISAM database engine, not for an InnoDB engine.

2. If there isn't a recent thread with your problem, then open a new thread.

3. One of the best practices when having a problem is to enable Debugging and to check the logs: the web server error log and the database and Moodle logs.

4. Do provide as much info as you can about your installation: OS, web server version, database server version, PHP version and Moodle version, at the very least.

5. Be as descriptive as possible about your problem by explaining what were you doing and what error messages you got (from recommendation #3).

Regarding these two last points, please read the moodle.org policy page for more info:

https://moodle.org/mod/page/view.php?id=7080

6. It is also a good practice to use a search engine, for example:

https://duckduckgo.com/?q=The+storage+engine+for+the+table+doesn%27t+support+repair

---

Given the lack of more information about your situation, I can only recommend you to see:

http://dev.mysql.com/doc/refman/5.5/en/mysqlcheck.html

In reply to Youssef Kassab

Re: Could not create guest user record !!!

by Nadav Kavalerchik -
Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators
I was upgradiing from MySQL 5.0 to 5.1 (on CentOS 5.4 64 bit ) and all my InnoDB tables where deleted or corrupted sad

One of them was mdl_user.
That is way i was getting this error message.

I issued mysqlcheck command to find out what was missing and i exported them (manually) from the old MySQL server and imported them into the new MySQL 5.1 server. successfully smile

mysqlcheack does not repair corrupted InooDB tables
In reply to Youssef Kassab

Re: Could not create guest user record !!!

by Thanga Kumar -

phpCAS error: phpCAS::client(): type mismatched for parameter $server_version (should be `string') in D:\MoodleWindowsInstaller-latest-19\server\moodle\auth\cas\auth.php on line 178