Try running the query that threw the “MySQL server has gone away” error from a MySQL client like phpmyadmin or the command-line mysql. That should update your wp_usermeta indexes. This is the query.
ALTER TABLE wp_usermeta
ADD UNIQUE KEY umeta_id (umeta_id),
DROP PRIMARY KEY,
ADD PRIMARY KEY (user_id, meta_key, umeta_id),
DROP KEY meta_key,
ADD KEY meta_key (meta_key, meta_value(32), user_id, umeta_id),
ADD KEY meta_value (meta_value(32), umeta_id),
DROP KEY user_id;
All the queries are here.
If it gets the same “MySQL server has gone away” error you should look at the last hundred lines or so of your MySQL error log. It may tell you what went wrong. This query tells you the location of that log on your MariaDB / MySQL server machine.
SHOW VARIABLES LIKE 'log_error';
I hope you can figure this out; your MySQL server seems to be unstable, and that’s not good.