My server hard disk crashed and unfortunately my MySQL backup (which occurs once a day) was missing some important data, but I have the files from the folder /var/lib/mysql.
On my new installation on Ubuntu 16.4, I installed MySQL successfully and attempted to copy the files from the old /var/lib/mysql to the new installation, however I encountered issues and decided to reinstall MySQL.
I've followed these instructions to fully uninstall and reinstall MySQL, however now when I try to install MySQL I see this output:
user@computer:~$ sudo apt-get install mysql-server mysql-client
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed
mysql-client mysql-server
0 to upgrade, 2 to newly install, 0 to remove and 0 not to upgrade.
Need to get 0 B/20.2 kB of archives.
After this operation, 317 kB of additional disk space will be used.
Selecting previously unselected package mysql-client.
(Reading database ... 213412 files and directories currently installed.)
Preparing to unpack .../mysql-client_5.7.12-0ubuntu1_all.deb ...
Unpacking mysql-client (5.7.12-0ubuntu1) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.7.12-0ubuntu1_all.deb ...
Unpacking mysql-server (5.7.12-0ubuntu1) ...
Setting up mysql-client (5.7.12-0ubuntu1) ...
Setting up mysql-server (5.7.12-0ubuntu1) ...
However:
- No prompt comes up of any kind, asking about database configuration OR setting a password for the MySQL
rootuser - No
/etc/mysql/folder is created - No
/var/lib/mysql/folder is created
When trying to uninstall mysql-common, I see the following error:
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies.
mysql-client : Depends: mysql-client-5.7 but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
How can I install MySQL correctly again with the prompts and correct folders, or how can I find the default /etc/mysql/ and /var/lib/mysql/ folder content to manually set it up?