ERROR db sshlogs: Incorrect string value
ERROR db sshlogs: Incorrect string value: '\xA0\xA0.dc2...' for column 'file' at row 1
This error has been observed while upgrading Ezeelogin since the log has some type of special characters.
1. Run the following command:
root@gateway:~# TBL=$(grep db_prefix /usr/local/etc/ezlogin/ez.conf | awk '{print $2}'); mysql -u root $(grep db_name /usr/local/etc/ezlogin/ez.conf | awk '{print $2}') -e "SELECT id,file FROM ${TBL}sshlogs ORDER BY id ASC LIMIT 1;"
2. Run the following command and replace the ID with the ID that you get from the above command:
root@gateway:~# php /usr/local/ezlogin/ez_queryrunner.php "update prefix_sshlogs set file='' where id=REPLACE WITH ID"
If the above steps end up following with an error then it could occur as a result of using outdated versions of MySQL. Try to manually truncate the ssh_log using below command.
1. Find the database name and table prefix using the below command.
root@gateway:~# grep -i "db_name\|prefix" /usr/local/etc/ezlogin/ez.conf
2. Log in to MySQL and view the ssh_logs using the database name and table prefix.
root@gateway:~# mysql -u root -p
mysql> use ezlogin_databasename;
mysql> SELECT id,file FROM prefix_sshlogs ORDER BY id ASC LIMIT 1;
3. Run the following command and replace the ID with the ID that you get from the above command:
root@gateway:~# php /usr/local/ezlogin/ez_queryrunner.php "update prefix_sshlogs set file='' where id=REPLACE WITH ID"