phpMyAdmin – MySQL import errors

I have a WordPress website (web A) and a staging site (web B) in which I’m working on updates and changes. On web A I receive comments from users, which I would like to export to web B. I understand the right way is through the comments database on phpMyAdmin.

I found this post from CMSMind, in which the process of exporting and then importing comments on phpMyAdmin is thoroughly explained. However, I’ve encountered a couple of issues when importing.

The original comments database originally had this line of code under the SQL tab and it worked fine:

SELECT * FROM `LzlcSCHMcomments` WHERE 1

I tried to do a test by importing a single comment, but some errors were found:

SELECT * FROM `LzlcSCHMcomments` WHERE 1

INSERT INTO `LzlcSCHMcomments` (`comment_ID`, `comment_post_ID`, `comment_author`, `comment_author_email`, `comment_author_url`, `comment_author_IP`, `comment_date`, `comment_date_gmt`, `comment_content`, `comment_karma`, `comment_approved`, `comment_agent`, `comment_type`, `comment_parent`, `user_id`) VALUES
(28814, 5900, 'AUTHOR', 'EMAIL', '', 'IP', '2022-10-18 06:34:30', '2022-10-18 05:34:30', 'COMMENT', 0, '0', 'Mozilla/5.0 (Windows NT 6.1; ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36', 'comment', 0, 0);

--
-- Índices para tablas volcadas
--

--
-- Indices de la tabla `LzlcSCHMcomments`
--
ALTER TABLE `LzlcSCHMcomments`
  ADD PRIMARY KEY (`comment_ID`),
  ADD KEY `comment_post_ID` (`comment_post_ID`),
  ADD KEY `comment_approved_date_gmt` (`comment_approved`,`comment_date_gmt`),
  ADD KEY `comment_date_gmt` (`comment_date_gmt`),
  ADD KEY `comment_parent` (`comment_parent`),
  ADD KEY `comment_author_email` (`comment_author_email`(10));

--
-- AUTO_INCREMENT de las tablas volcadas
--

--
-- AUTO_INCREMENT de la tabla `LzlcSCHMcomments`
--
ALTER TABLE `LzlcSCHMcomments`
  MODIFY `comment_ID` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28817;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

ERROR 1 – Static analysis:

1 error found during analysis. Unexpected conditions order. (near “FROM” at position 9)

ERROR 2 – MySQL said:

#1064 – Something’s wrong in your syntax near ‘INSERT INTO LzlcSCHMcomments (comment_ID, comment_post_ID, `comment_aut…’ on line 3

ERROR 3 –
MODIFY `comment_ID` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28817; COMMIT;

On this COMMIT there’s an error stating: No operations were started previously (near COMMIT).

This is the first time I work on my databases, so I really appreciate your help. Thanks a lot in advance!