I am not sure why I get this error # 1062 - Duplicate entry '1' for key 1 cany, someone explains what this means. Thanks
Most likely, your column will be unique, and you will try to enter a row with an identifier that already exists in your table.
You are probably trying to insert a record with identifier (or some other field) 1 , while such a record already exists in the table. The field, which is the primary key, must have a unique value for each record.
1
I think you are trying to insert "1" into a unique key field that already has a value of "1"
The problem is with your file - you are trying to create a database using a copy - at the top of your file you will find something like this:
CREATE DATABASE IF *THE_NAME_OF_YOUR_DB* DOES NOT EXIST *THE_NAME_OF_YOUR_DB* DEFAULT SETTING PARAMETER latin1 COLLATE latin1_general_ci; USE *THE_NAME_OF_YOUR_DB* ;
*THE_NAME_OF_YOUR_DB*
and Iām sure that you already have a database with this name - IN ONE SERD - please check.
You need to add a primary key with a group in which one primary key must be unique. for example, if the table has 4 columns id, name, address, group_id, where group_id has a duplicate value, if I want to add group_id as primary, then this should be in the group consisting of id and group_id