Database Connection Failed

While trying to fix these problems (Changes not saving - #8 by russlhuizing and Publishing Error) I unexpectedly got a Database Connection Failed when I go to the site. Below is mysql error log. Any thoughts?

2018-10-28 13:24:53 1995554816 [ERROR] mysqld: File ‘/var/lib/mysql/aria_log_control’ not found (Errcode: 13 “Permission denied”)
2018-10-28 13:24:53 1995554816 [ERROR] mysqld: Got error ‘Can’t open file’ when trying to use aria control file ‘/var/lib/mysql/aria_log_control’
2018-10-28 13:24:53 1995554816 [ERROR] Plugin ‘Aria’ init function returned error.
2018-10-28 13:24:53 1995554816 [ERROR] Plugin ‘Aria’ registration as a STORAGE ENGINE failed.
2018-10-28 13:24:53 1995554816 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2018-10-28 13:24:53 1995554816 [Note] InnoDB: The InnoDB memory heap is disabled
2018-10-28 13:24:53 1995554816 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-10-28 13:24:53 1995554816 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-10-28 13:24:53 1995554816 [Note] InnoDB: Compressed tables use zlib 1.2.8
2018-10-28 13:24:53 1995554816 [Note] InnoDB: Using Linux native AIO
2018-10-28 13:24:53 1995554816 [Note] InnoDB: Using generic crc32 instructions
2018-10-28 13:24:53 1995554816 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2018-10-28 13:24:53 1995554816 [Note] InnoDB: Completed initialization of buffer pool
2018-10-28 13:24:53 1995554816 [ERROR] InnoDB: ./ibdata1 can’t be opened in read-write mode
2018-10-28 13:24:53 1995554816 [ERROR] InnoDB: The system tablespace must be writable!
2018-10-28 13:24:53 1995554816 [ERROR] Plugin ‘InnoDB’ init function returned error.
2018-10-28 13:24:53 1995554816 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
2018-10-28 13:24:53 1995554816 [Note] Plugin ‘FEEDBACK’ is disabled.
2018-10-28 13:24:53 1995554816 [ERROR] Unknown/unsupported storage engine: InnoDB
2018-10-28 13:24:53 1995554816 [ERROR] Aborting

As a remedy, I have tried to reinstall the entire system with backups using this: https://pkp.sfu.ca/ojs/docs/userguide/2.3.1/systemAdministrationRestoring.html (I have successfully reinstalled the ojs-install.tar.gz and the ojs-files.sql.gz)

However, when I try to reinstall the backup database file (ojs-database.sql.tgz) I keep getting an error that the file is not in gzip format (I tried changing the extension to .gz but that did not work). I have also set up a user and a password but I keep getting an Error 1045 (28000): Access denied for user ‘pkpuser’@‘localhost’ (using password:YES). I am not sure why since I set up the pkpuser and the password in mysql and was able to login using it.

If I remove the index.html file that I am temporarily using, I get a Database Connection Failed error still.

Where do I go from here?

Hi @russlhuizing

The first error indicates permission issues. You database cannot access the file: /var/lib/mysql/aria_log_control. So the problem should be not in user’s access to the database, but rather the database access to the files.