ERROR: insert failed: insert into log (date, event, user, groupname, comments, patient_id, success, checksum,crt_user) values ( '2016-07-29 21:35:10', 'security-administration-select', '','','U+S1auFQhc0jF8+JKaK7ko773lAsQCD+9QpELAuqBmc=','0','1','','')

advancedmedical wrote on Saturday, July 30, 2016:

Hi, please help;
we use WIN7, OEMR 4.2.2 Xampp 3.2.1
everything was working fine, then we had an power outage; the powerbackup did not work at the same time so the whole server shut down; upon boot up i got this message:

ERROR: insert failed: insert into log (date, event, user, groupname, comments, patient_id, success, checksum,crt_user) values ( ‘2016-07-29 21:35:10’, ‘security-administration-select’, ‘’,’’,‘U+S1auFQhc0jF8+JKaK7ko773lAsQCD+9QpELAuqBmc=’,‘0’,‘1’,’’,’’)

Error: Duplicate entry ‘51610847’ for key ‘PRIMARY’

C:\xampp\htdocs\openemr\library\log.inc at 762:sqlInsertClean_audit
C:\xampp\htdocs\openemr\library\sql.inc at 206:auditSQLEvent(select distinct name from groups,1,)
C:\xampp\htdocs\openemr\interface\login\login.php at 72:sqlStatement(select distinct name from groups)

please help i am desperate and can not log in
sincerely

gowepp wrote on Saturday, July 30, 2016:

Hello,

Please check for mysql database corruption using mysqlcheck commands. It may also fix the database.

Let us know if this helps.

Thanks,
Wepp Team

advancedmedical wrote on Saturday, July 30, 2016:

Hi Wepp team,
running
mysqlcheck: Got error: 1044: Access denied for user ‘’@‘localhost’ to databases ’
databases’ when selecting the database

i am reading this “http://dev.mysql.com/doc/refman/5.7/en/mysqlcheck.html” but still not working…i have been very nervous since last night
please more advise

advancedmedical wrote on Saturday, July 30, 2016:

i got to
c:\xampp\mysql\bin>mysqlcheck -u root - p pass databases
Enter password:

but i dont have the password. where can i find that?

gowepp wrote on Saturday, July 30, 2016:

If root password is not known please try resetting the password using,

Open the shell from the XAMPP control pane and execute this command:

mysqladmin.exe -u root password secret

This sets the root password to ‘secret’.

Thanks,
Wepp Team

advancedmedical wrote on Saturday, July 30, 2016:

hi
the message
mysqladmin.exe: connect to server at ‘localhost’ failed
error: ‘Access denied for user ‘root’@‘localhost’ (using password: NO)’

advancedmedical wrote on Saturday, July 30, 2016:

i tried again
c:\xampp\mysql\bin>mysqlcheck -u root - p pass databases
Enter password: (pass) and (secret)
and still Got error: 1045: Access denied to user ‘root’@‘localhost’ (using password: YES) when trying to connect

advancedmedical wrote on Saturday, July 30, 2016:

sorry i want to verify that i enter

Enter password: of either pass or secret

gowepp wrote on Saturday, July 30, 2016:

If you have executed the below command

mysqladmin.exe -u root password secret

then your password will be secret. So you need to modify your above command to

mysqlcheck -c *yourdatabase* -u root -psecret

advancedmedical wrote on Saturday, July 30, 2016:

Hi
yourdatabase
sorry i have never touch nor rename the databases

i tried:
mysqlcheck -c databases -u root -p secret
still ask me for Enter password: i then enter neither secret then again with pass
those are not function and gave this
mysqlcheck: Got error: 1049: Unknown databases ‘databases’ when selecting the databases

advancedmedical wrote on Saturday, July 30, 2016:

where can this databases call and located? sorry i never really touch nor rename them

advancedmedical wrote on Saturday, July 30, 2016:

Hi Wepp team, please check your inbox message.

anyone else out there can help…please

advancedmedical wrote on Saturday, July 30, 2016:

Hi i got it to check and now login shows:

ERROR: insert failed: insert into log (date, event, user, groupname, comments, patient_id, success, checksum,crt_user) values ( ‘2016-07-30 11:04:28’, ‘security-administration-select’, ‘’,’’,‘U+S1auFQhc0jF8+JKaK7ko773lAsQCD+9QpELAuqBmc=’,‘0’,‘1’,’’,’’)

Error: Table ‘.\openemr\log’ is marked as crashed and should be repaired

C:\xampp\htdocs\openemr\library\log.inc at 762:sqlInsertClean_audit
C:\xampp\htdocs\openemr\library\sql.inc at 206:auditSQLEvent(select distinct name from groups,1,)
C:\xampp\htdocs\openemr\interface\login\login.php at 72:sqlStatement(select distinct name from groups)

advancedmedical wrote on Saturday, July 30, 2016:

thank you so much Wepp team;
after a long struggle we got it to check and work again

so this is what we did
mysqlcheck -u root -p (databases=which is openemr)
it asked for the password; which is the original (****)
then i enter that password
it ran for a while
then report many errors
we follow with
mysqlcheck -u root -p --auto-repair openemr
then it asked for password
it ran and corrected everything at the end…
sincerely thankful for all the helps and supports…
God bless

gowepp wrote on Saturday, July 30, 2016:

Great you are now able to login.

Thanks,
Wepp Team