H
H
howlninja2020-05-03 18:54:11
PHP
howlninja, 2020-05-03 18:54:11

What to do with DB import error in phpmyadmin?

I downloaded Wampserver for educational purposes, went to PhpMyAdmin. Created an Addressbook database into which to import the sql file. When importing, it displays:
Import completed successfully, 18 requests completed. (addressbook.sql)

Error

Static analysis:

Found 3 errors while parsing.

A symbol name was expected! (near "work" at position 452)
Unexpected start of expression. (near "2" at position 676)
Unrecognized statement type. (near "NOT NULL" at position 679)

SQL query:

CREATE TABLE addressbook ( domain_id int(9) unsigned NOT NULL default 0, id int(9) unsigned NOT NULL, firstname varchar(255) NOT NULL, middlename varchar(255) NOT NULL, lastname varchar(255) NOT NULL, nickname varchar (255) NOT NULL, company varchar(255) NOT NULL, title varchar(255) NOT NULL, address text NOT NULL, addr_long text, addr_lat text, addr_status text, home text NOT NULL, mobile text NOT NULL, work text NOT NULL , fax text NOT NULL, email text NOT NULL, email2 text NOT NULL, email3 text NOT NULL, im text NOT NULL, im2 text NOT NULL, im3 text NOT NULL, homepage text NOT NULL, bday tinyint(2) NOT NULL, bmonth varchar(50) NOT NULL, byear varchar(4) NOT NULL, aday tinyint(2) NOT NULL, amonth varchar(50) NOT NULL, ayear varchar(4) NOT NULL, address2 text NOT NULL, phone2 text NOT NULL, notes text NOT NULL, photo mediumtext, x_vcard mediumtext,x_activesync mediumtext, created datetime default NULL, modified datetime default NULL, deprecated datetime default NULL, password varchar(256) default NULL, login date default NULL, role varchar(256) default NULL, PRIMARY KEY (id,deprecated,domain_id), KEY deprecated_domain_id_idx (deprecated,domain_id) ) DEFAULT CHARSET=utf8
1171 - All parts of the primary key (PRIMARY KEY) must be defined as NOT NULL; If you need support for NULL values ​​in the key, use the UNIQUE index

Please tell me how to solve this? I did everything according to the instructions in the video, there was no such error

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2020-05-03
@dimonchik2013

score
or manually check the encoding and data

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question