Title might be a bit misleading but thats where I was at trying to fix it last.
I have tried all manner of things
Mysql folder backed up and so are the dumps just incase.
Copying over the backed up mysql folder caused issues like "Table 'psa.accounts' doesn't exist in engine,"
Locally testing the psa inside the backup is bricked but the dump is fine.
So obviously the next step after I figured out the dump is fine I tried to import it following plesk guidelines
So I tried to export it locally into a .sql and then went off to server to import it with " plesk db < psa.sql " which resulted in tables already existing.
After this the snag I have hit, mysql server loses connection / restarts whenever I try to drop psa.
Any suggestions how to overcome this ?
PS. /var/logs/mysql has nothing more than errors about corrupt database aka the doesnt exist engine errors I assume because rest of the databases are fine, only psa is the one affected.
/var/logs/syslog only has mariadb starting, but not why it stopped.
EDIT
I tried to move over the working database on local to server. Now some tables show OK in mysqlcheck but others still not found in engine.
EDIT 2
and
I have tried all manner of things
- Tried to restore dump
- Reinstalled mysql
- Tried to drop PSA to import the new dump
Mysql folder backed up and so are the dumps just incase.
Copying over the backed up mysql folder caused issues like "Table 'psa.accounts' doesn't exist in engine,"
Locally testing the psa inside the backup is bricked but the dump is fine.
So obviously the next step after I figured out the dump is fine I tried to import it following plesk guidelines
zcat mysql.daily.dump.0.gz | sed -n '/-- Current Database: `psa`/,/-- Current Database:*/p' | MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin --default-character-set=utf8
ERROR 2013 (HY000) at line 12: Lost connection to MySQL server during query
So I tried to export it locally into a .sql and then went off to server to import it with " plesk db < psa.sql " which resulted in tables already existing.
After this the snag I have hit, mysql server loses connection / restarts whenever I try to drop psa.
MariaDB [(none)]> drop database psa;
ERROR 2013 (HY000): Lost connection to MySQL server during query
Any suggestions how to overcome this ?
PS. /var/logs/mysql has nothing more than errors about corrupt database aka the doesnt exist engine errors I assume because rest of the databases are fine, only psa is the one affected.
/var/logs/syslog only has mariadb starting, but not why it stopped.
EDIT
I tried to move over the working database on local to server. Now some tables show OK in mysqlcheck but others still not found in engine.
EDIT 2
# zcat mysql.daily.dump.0.gz | sed -n '/-- Current Database: `psa`/,/-- Current Database:*/p' | MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin --default-character-set=utf8
ERROR 1813 (HY000) at line 15: Tablespace for table '`psa`.`APSApplicationItems`' exists. Please DISCARD the tablespace before IMPORT.
and
MariaDB [psa]> drop table APSApplicationItems;
ERROR 1051 (42S02): Unknown table 'psa.APSApplicationItems'
Last edited: