2

I had to reinstall my server and was able to grab the /var, /usr, and /etc directory. Once the server was reinstalled, I installed mysql and phpmyadmin. Afterwards, I tried to put my database files back into the new server. All tables came over fine, but when I transferred the user table in the mysql database, I started getting errors, then I couldn't use the "service mysql reload" command because the server didn't recognize any password. So, I decided the remove mysql and reinstall it. Unfortunately I have been having trouble since, dpkg won't configure the package, so I deleted the mysql folder from /var and from /etc... Now dpkg is saying,

root@thegamingcorner:~# apt-get -f install mysql-server-5.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-server-5.6 is already the newest version.
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up mysql-server-5.6 (5.6.25-0ubuntu0.15.04.1) ...
update-alternatives: error: alternative path /etc/mysql/mysql.cnf doesn't exist
dpkg: error processing package mysql-server-5.6 (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.6; however:
  Package mysql-server-5.6 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates it's a follow-up error from a previous failure.
                            Errors were encountered while processing:
 mysql-server-5.6
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)"
This happens everytime I try to remove, purge, reinstall, or install the package, I looked through some of the similar problems and no answers worked, so far I have tried:
"dpkg --configure -a"
"apt-get install mysql-server --reinstall"
"apt-get remove --purge mysql-server"
"dpkg --purge mysql-server"

I am honestly stuck, and I don't know what to do. Also, if there are logs that were not in the mysql folder, please tell me where to find them so I can post it.

1
  • @Ravan Yes, you are right, my bad Sep 28, 2015 at 13:22

1 Answer 1

1

Alright, I tried something else, What I did was, Copied the backed up /etc/mysql folder from the old verison, renamed my.cnf to mysql.cnf, and ran

    root@thegamingcorner:~# dpkg --configure -a
    Setting up mysql-server-5.6 (5.6.25-0ubuntu0.15.04.1) ...
    update-alternatives: warning: alternative /etc/mysql/my.cnf.fallback (part of link group my.cnf) doesn't exist; removing from list of alternatives
    update-alternatives: warning: forcing reinstallation of alternative /etc/mysql/mysql.cnf because link group my.cnf is broken
    2015-09-28 10:40:02 0 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
    2015-09-28 10:40:02 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
    2015-09-28 10:40:02 0 [Note] /usr/sbin/mysqld (mysqld 5.6.25-0ubuntu0.15.04.1) starting as process 9669 ...
    Setting up mysql-server (5.6.25-0ubuntu0.15.04.1) ...

After that, I was able to successfully purge and reinstall mysql.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .