Home Linux ServerWeb Server Handling the syntax error: INSERT INTO counter

Handling the syntax error: INSERT INTO counter

by Thạch Phạm
Published: Last Updated on
A+A-
Reset

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.

Đánh giá

Tham gia nhóm hỗ trợ Server - Hosting

Tham gia nhóm Hỗ trợ Server - Hosting & WordPress để cùng nhau hỏi đáp và hỗ trợ các vấn đề về WordPress, tối ưu máy chủ/server.

Tham gia ngay

Bài viết cùng chuyên mục

AZDIGI – Không chỉ là đơn vị hàng đầu trong lĩnh vực Web Hosting và Máy chủ, chúng tôi mong muốn mang lại những kiến thức bổ ích nhất và luôn cập nhật thường xuyên cho cộng đồng người đam mê thiết kế website, công nghệ,…

Vui lòng không sao chép nội dung nếu chưa xin phép. Designed and Developed by PenciDesign