Receiving SQL error upon login

docmanager wrote on Thursday, September 03, 2009:

Hello Everyone,

I’ve had OpenEMR 2.8.3 running in a Fedora 9 VMWare virtual machine on Mac OS X flawlessly for quite some time.  I had a horrible time with upgrading OS X to Snow Leopard (that’s a whole other story…) and it’s resulted in me having to pull a backup of the virtual machine from about 2 weeks ago to start using.  You’d think that would be fine, but now suddenly upon trying to log in to OpenEMR as admin or any other user I receive an SQL error like this:

ERROR: insert failed: insert into log (date, event, user, groupname, comments) values (NOW(), ‘login’,‘admin’,‘Scheidler Family Clinic’,‘success’) (Duplicate entry ‘307298’ for key 1)

I checked the “log” table and there is no entry with ID ‘307298’.  I even went as far as to just dump all the contents of the ‘log’ table and I still receive the same message.

I’m at a loss for what else to try!  Any help is greatly appreciated, I’ve got to get this thing working ASAP.

Thanks,
Jacob

bradymiller wrote on Thursday, September 03, 2009:

hey,
First, check the database with the ‘mysqlcheck’ command to see if any database corruption.
-brady

docmanager wrote on Thursday, September 03, 2009:

That fixed it, Brady, thanks so much!  For future reference of anyone who might see this thread, mysqlcheck found some problems, then I ran it again with the --repair option and it fixed them.

Jacob