I know this is kinda stupid thing but I had some issues in my mysql database, I fixed them but when I had to delete some folders I executed a command to delete this folder /etc/mysql
I have a lot of important databases which disallows me to reinstall MySQL. Is there anything like any command that allows me to recover these files? Everything was in default format so I don't really care about like the old format. If so please reply to this topic with answer or even send me a .zip file contains all files with default format for the latest MySQL version (5.7).
Thanks. I use ubuntu 16.04 by the way.
EDIT: after processing what is showing here as someone linked this topic in comments here So now I have an issue with MySQL itself. Here's the Error message:
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Sat 2019-12-21 16:59:38 EST; 5ms ago
Process: 3942 ExecStartPost=/usr/share/mysql/mysql-systemd-start post (code=exited, status=0/SUCCESS)
Process: 3941 ExecStart=/usr/sbin/mysqld (code=exited, status=2)
Process: 3933 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 3941 (code=exited, status=2)
Dec 21 16:59:38 ns529730 systemd[1]: Failed to start MySQL Community Server.
Dec 21 16:59:38 ns529730 systemd[1]: mysql.service: Unit entered failed state.
Dec 21 16:59:38 ns529730 systemd[1]: mysql.service: Failed with result 'exit-code'.
dpkg: error processing package mysql-server-5.7 (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
mysql-server-5.7
E: Sub-process /usr/bin/dpkg returned an error code (1)
/var/lib/mysql
by default. You should anyway make a backup of that directory, before you mess with your configuration. – vidarlo Dec 21 '19 at 21:43