Nội dung
In this article, AZDIGI will guide you through handling syntax error: INSERT INTO counter.
I. Introduction
In the process of transferring data from the old infrastructure to the new infrastructure, there is an error I encounter quite often.
This error usually appears when the old system uses the old version of MySQL, and it will use the newer MySQL or MariaDB on the new system. Here is a picture of this error:
II. Handling the syntax error: INSERT INTO counter
To fix the syntax error: INSERT INTO counter, we need to do the following 2 steps.
Step 1: SSH into your DirectAdmin system
To upgrade the ProFTPD version on DirectAdmin, we first need to SSH or access your VPS/server with root privileges. If you don’t know how to SSH into your VPS/Server, you can refer to the following tutorial:
Step 2: Handling syntax error: INSERT INTO counter
To fix this error, you need to add the following configuration to the my.cnf file:
sql_mode = ""
Normally, the my.cnf file will be located at the following path:
/etc/my.cnf
After adding this configuration line, you need to restart the MySQL/MariaDB service for the service to receive the new configuration.
If it still doesn’t work, you need to add the following configuration line and restart MySQL/MariaDB:
innodb_strict_mode = 0
At this point, the error will be fixed and the website will function normally.
III. Summary
Hopefully, through the above two steps, you will easily handle the syntax error: INSERT INTO counter.