I've ran into a problem with my computer, so I needed to format it and fully re-install all my OS (Linux Mint 20.3). This wasn't a problem, since I need to re-import all my databases from a previously created .sql
dump that I've created before starting the process of cleaning my computer.
I've used phpMyAdmin to create a full dump of my MySQL server. But, after fully reinstalling my OS, softwares and MySQL Server (version 8.0.27), I can't re-import my .sql
dump.
Tried using CLI mysql
command ( mysql -u raphael < localhost.sql
) and directly from phpMyAdmin web interface, but I'm always receiving the following error:
ERROR 2013 (HY000) at line 17476: Lost connection to MySQL server during query
This dump has some Wordpress databases, and the content at line 17476 is that:
ALTER TABLE `wp_posts`
ADD PRIMARY KEY (`ID`),
ADD KEY `post_name` (`post_name`(191)),
ADD KEY `type_status_date` (`post_type`,`post_status`,`post_date`,`ID`),
ADD KEY `post_parent` (`post_parent`),
ADD KEY `post_author` (`post_author`);
It's a very large file (aprox. 2.116.647 lines) and it's crucial to me to restablish all databases, because most of them are related to my work.
I've already tried to edit the /etc/mysql/my.cnf
file, adding the following content:
[mysqld]
max_allowed_packet = 512M
connect_timeout = 600
But the problem still persists.
Can someone please help me?
Thanks!