I wanted to change the ownership of a specific folder and I ended up hitting the enter unintentionally when typing, it crashed everything! apache mysql, ispconfig. help me please!! Code: [email protected]:~# service mysql start Job for mariadb.service failed because the control process exited with error cod e. See "systemctl status mariadb.service" and "journalctl -xe" for details.
Can you 'chown root:root /' now? If not you might have to but off another media, mount your root partition, then run chown.
Thanks for the reply Jesse Norell, I entered Rescue mode system offered by vps and mounted the partition, so I managed to redo the 'chown root: root /' command. But mysql doesn't run and neither does apache
Messing up ownership of files can cause big issues like this. Some folders have to be owned by Apache, some by ispconfig, etc. Do you have a backup that you can restore? If not, it will take quite some time to restore this correctly by comparing it with a working system...
Th0m, thanks for the reply, I tried to restart, I did everything I knew. a question: if i save the / var / lib / mysql folder with the database and copy it in a new installation, does it work?
Again, do you have a backup (snapshot) of the server that you can go back to? You could copy your files to a new installation but it is not a simple copy paste action.
No. The problem is the files have wrong owner and group owner. Copying them to a new installation does not change this. If you do not have backups you can restore, only way I can think of is compare with a working similar installation what owners and group owners files have and change accordingly. This is a lot of work. Restoring from backups is preferable.
Thanks for the reply Taleman, I managed to recover the sql files with the command chown -R mysql: mysql /var/lib/mysql + mv /var/lib/mysql/tc.log /var/lib/mysql/tc.log.bkp What was blocking mysql from starting was the log. Now I'm trying to start Apache
I would strongly advise you to do a full restore from a snapshot or reinstall as this can cause issues in the future.