but I get the same failure
I also reinstalled my roundcubemail but it can no longer connect to the db. but one issue at a time. What can I do to troubleshoot my backup-data - any suggestions?
Here are the log outputs /var/log/backup/backup-backup-data
Backup: backup-data
Backup started at 2019-04-04 01:00:02
Event pre-backup-data: FAIL
Backup status: FAIL
** /var/log/messages**
Apr 28 01:00:07 main esmith::event[31800]: Action: /etc/e-smith/events/pre-backup-data/S20nethserver-backup-config-predatabackup SUCCESS [4.640261]
Apr 28 01:00:13 main esmith::event[31800]: Action: /etc/e-smith/events/pre-backup-data/S20nethserver-restore-data-duc-index SUCCESS [5.401965]
Apr 28 01:00:13 main esmith::event[31800]: Action: /etc/e-smith/events/pre-backup-data/S50mysql-dump-tables FAILED: 1 [0.199199]
Apr 28 01:00:14 main esmith::event[31800]: Action: /etc/e-smith/events/pre-backup-data/S50nethserver-webtop5-backup SUCCESS [0.696454]
Apr 28 01:00:14 main esmith::event[31800]: Event: pre-backup-data FAILED
No it does not start. I restarted the server and tried to start mysql
mysqld.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2019-05-02 16:05:51 MDT; 3s ago
Process: 8053 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=1/FAILURE)
May 02 16:05:50 main.nbs.marketing systemd[1]: Starting MariaDB database server…
May 02 16:05:51 main.nbs.marketing mariadb-prepare-db-dir[8053]: Database MariaDB is not initialized, but the directory /var/lib/mysql is not empty, so initialization cannot be done.
May 02 16:05:51 main.nbs.marketing mariadb-prepare-db-dir[8053]: Make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
May 02 16:05:51 main.nbs.marketing systemd[1]: mysqld.service: control process exited, code=exited status=1
May 02 16:05:51 main.nbs.marketing systemd[1]: Failed to start MariaDB database server.
May 02 16:05:51 main.nbs.marketing systemd[1]: Unit mysqld.service entered failed state.
May 02 16:05:51 main.nbs.marketing systemd[1]: mysqld.service failed.
I found that the /var/lib/mysql directory is missing. I added mysql directory but then it gives me the error that I have incorrect rights on the directory but I don’t know what rights it needs.
mysql now starts
when I try to access mysql with just mysql I get this
ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)
service mysqld stop mysqld_safe --skip-grant-tables & mysql FLUSH PRIVILEGES; set password for 'root'@'localhost' = PASSWORD('yourcopiedpwd');
And then:
systemctl stop mysqld systemctl start mysqld
If from service interface mysql remains stopped launch this other commands:
mysqladmin shutdown systemctl start mysqld
Then I suggest you to create an admin account with all privileges with this mysql command: GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'adminpassword';
You can use it for application like phpmyadmin.
Try to reboot the server and check if it works properly by log into mysql with mysql command. Process starts automatically only if you did systemctl enable mysqld before.
Then you can check if backup works properly with command backup-data -b backup-data
Fantastic! That has solved my backup problem. Backup was successful. Interesting that the nethserver dashboard still reports last backup as an errror.
Thanks so much!!!
Is there any chance you can give me some guidance with getting roundcube back online? I get a database error connection failed message. I am guessing the mysql password needs to be changed or that uninstalling and reinstalling has left the db missing or unconfigured.
Any thoughts?