T
T
TheAndrey72021-12-01 17:24:08
MySQL
TheAndrey7, 2021-12-01 17:24:08

The database dump is not imported. What's wrong with the structure?

Unable to import database dump. I'm getting this weird error on an INSERT query.
Can't find record in 'accounts'
The problem reproduces everywhere, on different versions of MariaDB and database dumps. Occurs with the same table.

Table structure:

CREATE TABLE `accounts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `provider` varchar(255) NOT NULL,
  `account_id` varchar(255) NOT NULL,
  `account_info` varchar(255) NOT NULL,
  `date` datetime NOT NULL,
  `last_sync` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `provider_account` (`provider`,`account_id`) USING HASH,
  KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

Empirically, I found the culprit of the problem - the provider_account index . What's wrong with him? The problem manifested itself only when importing the database.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question