❤️ AZDIGI has officially updated to a new blog system. However, some posts may have incorrect or mismatched images. Please click the Report article button at the bottom of the post so AZDIGI can update as quickly as possible. Thank you!

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:

syntax error: INSERT INTO counter

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:

AZDIGI Tutorial
sql_mode = ""
    

Normally, the my.cnf file will be located at the following path:

AZDIGI Tutorial
/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:

AZDIGI Tutorial
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.

Share:
This article has been reviewed by AZDIGI Team

About the author

Thạch Phạm

Thạch Phạm

Đồng sáng lập và Giám đốc điều hành của AZDIGI. Có hơn 15 năm kinh nghiệm trong phổ biến kiến thức liên quan đến WordPress tại thachpham.com, phát triển website và phát triển hệ thống.

10+ years serving 80,000+ customers

Start your web project with AZDIGI