Error: Log table "log" is full

WAMP 3.0.8
MySQL 5.7.11
PHP 7.0.4
Apache 2.4.18

I am trying to upgrade from 4.2.2 to 5.0.1 and when I ran the sql_upgrade.php. I received this error message.

ALTER TABLE log ADD category varchar(255) default NULL
ERROR: query failed: ALTER TABLE log ADD category varchar(255) default NULL

Error: The table ‘log’ is full

C:\emr_wamp\www\openemr-5\library\sql_upgrade_fx.php at 675:sqlStatement
C:\emr_wamp\www\openemr-5\sql_upgrade.php at 56:upgradeFromSqlFile(4_2_2-to-5_0_0_upgrade.sql)

Should I backup the table that has over 35 million records in it, then truncate the table?

Hi @juggernautsei ,

Two things to note here:

  1. There is a mechanism to backup and clear the log tables (note there is more than 1 log table, so good to use that process) at Administration->Backup->Create Eventlog Backup

  2. There are a list of things that can cause the full error in mysql. Check out these pages:


I added the archive/TAR.php and PEAR.php files to my windows server and ran the script. It produced this.

“C:/xampp/mysql/bin\mysqldump -u “tom-tom-4321” -p"QNeYYdsGLH7b5C6z” --opt --quote-names -r C:/windows/temp/emr_eventlog_backup/eventlog_20170422_131807.sql “openemr5p” --tables log_comment_encrypt_backup log_backup log_validator_backup" returned 1:

The folder was created but it seems the system assumes that XAMPP will be used. I have not dug in to see where this veriable is being filled. I personally don’t use xampp.

I was getting the full message because the folder mounted drive that I am storing the database in was full. I under estimated how fast the database was going to grow and some other things and so once I cleared the databases not need and the log tables. The upgrade when through.

Hi @juggernautsei ,
I am pretty sure the temp path variable is set at Administration->Globals->Miscellaneous->Path to Temporary Files

@juggernautsei ,
Also can find the ‘Path to MySQL Binaries’ and ‘Path for Event Log Backup’ settings in the same Miscellaneous section.

Thanks for reminding me…

Can I just truncate log_comment_encrypt?
Will it cause error?
Because my log table is too large and cannot make backup.