D
D
denism3002019-01-13 15:22:36
JavaScript
denism300, 2019-01-13 15:22:36

How to migrate database from MySQL to MariaDB?

There is a MySQL database, I do the export using PhpMyAdmin, then I try to upload it to the server with MariaDB, I get errors and the keys are not installed.
for example, a query like this:

ALTER TABLE `co1k4_action_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_user_id` (`user_id`),
  ADD KEY `idx_user_id_logdate` (`user_id`,`log_date`),
  ADD KEY `idx_user_id_extension` (`user_id`,`extension`),
  ADD KEY `idx_extension_item_id` (`extension`,`item_id`);

gives the following error:
#1068 - Multiple primary key defined

at the same time, if you fill in the dump in the sql database, then everything is ok.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Ukolov, 2016-04-20
@drtvader

Well, after all, in the error message, even the place is indicated by an arrow.
You are trying to declare variables inside an object and hang event handlers. Of course, this cannot be done.
Then you ask " If you can't do this, then how should you do it? ". I can't answer this question because I don't know your problem. Perhaps you just need to separate your logic and initialization of jScrollPane , or maybe you need to move your logic into some kind of callback that is called by jScrollPane when some event occurs.
Most likely, you need exactly the second option - to hang some of your own logic after starting jScrollPane . Therefore, you ask " What kind of callback do I need?". I will answer this unasked question - see the plugin documentation, everything is always written there.

R
Roman Mirilaczvili, 2019-01-13
@2ord

I believe that more than one attempt was made to ALTER TABLE and as a result of the previous PRIMARY KEY (`id`) was already added, as well as the rest of the keys.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question