How can I completely uninstall mysql-server and reinstall?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I recently upgraded from 12.10 to 16.04 on my server. After upgrading (which appears to have gone fine), I was unable to login to my mysql server. As such, I uninstalled the server, and reinstalled using:
apt-get remove mysql-server
apt-get install mysql-server
However, now it always seems to give me:
Renaming removed key_buffer and myisam-recover options (if present)
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
insserv: warning: script 'screen-cleanup' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `screen-cleanup'
insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `screen-cleanup'
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.
dpkg: error processing package mysql-server-5.7 (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up mysql-client (5.7.16-0ubuntu0.16.04.1) ...
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.7; however:
Package mysql-server-5.7 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Processing triggers for systemd (229-4ubuntu11) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
mysql-server-5.7
mysql-server
I tried stopping the service, uninstalling, purging, and even removing /etc/mysql and /var/lib/mysql (after backing up, of course).
I'm at a complete loss as to why this is happening now. I can't seem to recover my database data. I've noticed that whenever I do this uninstall/reinstall procedure, it's not asking me for a mysql password, so I wonder if it's not completely uninstalled.
server uninstall mysql
add a comment |
I recently upgraded from 12.10 to 16.04 on my server. After upgrading (which appears to have gone fine), I was unable to login to my mysql server. As such, I uninstalled the server, and reinstalled using:
apt-get remove mysql-server
apt-get install mysql-server
However, now it always seems to give me:
Renaming removed key_buffer and myisam-recover options (if present)
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
insserv: warning: script 'screen-cleanup' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `screen-cleanup'
insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `screen-cleanup'
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.
dpkg: error processing package mysql-server-5.7 (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up mysql-client (5.7.16-0ubuntu0.16.04.1) ...
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.7; however:
Package mysql-server-5.7 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Processing triggers for systemd (229-4ubuntu11) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
mysql-server-5.7
mysql-server
I tried stopping the service, uninstalling, purging, and even removing /etc/mysql and /var/lib/mysql (after backing up, of course).
I'm at a complete loss as to why this is happening now. I can't seem to recover my database data. I've noticed that whenever I do this uninstall/reinstall procedure, it's not asking me for a mysql password, so I wonder if it's not completely uninstalled.
server uninstall mysql
Even trying to uninstall gives this error. It seems the package is in a weird state.
– jwir3
Oct 27 '16 at 20:49
add a comment |
I recently upgraded from 12.10 to 16.04 on my server. After upgrading (which appears to have gone fine), I was unable to login to my mysql server. As such, I uninstalled the server, and reinstalled using:
apt-get remove mysql-server
apt-get install mysql-server
However, now it always seems to give me:
Renaming removed key_buffer and myisam-recover options (if present)
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
insserv: warning: script 'screen-cleanup' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `screen-cleanup'
insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `screen-cleanup'
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.
dpkg: error processing package mysql-server-5.7 (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up mysql-client (5.7.16-0ubuntu0.16.04.1) ...
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.7; however:
Package mysql-server-5.7 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Processing triggers for systemd (229-4ubuntu11) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
mysql-server-5.7
mysql-server
I tried stopping the service, uninstalling, purging, and even removing /etc/mysql and /var/lib/mysql (after backing up, of course).
I'm at a complete loss as to why this is happening now. I can't seem to recover my database data. I've noticed that whenever I do this uninstall/reinstall procedure, it's not asking me for a mysql password, so I wonder if it's not completely uninstalled.
server uninstall mysql
I recently upgraded from 12.10 to 16.04 on my server. After upgrading (which appears to have gone fine), I was unable to login to my mysql server. As such, I uninstalled the server, and reinstalled using:
apt-get remove mysql-server
apt-get install mysql-server
However, now it always seems to give me:
Renaming removed key_buffer and myisam-recover options (if present)
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
insserv: warning: script 'screen-cleanup' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `screen-cleanup'
insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `screen-cleanup'
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.
dpkg: error processing package mysql-server-5.7 (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up mysql-client (5.7.16-0ubuntu0.16.04.1) ...
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.7; however:
Package mysql-server-5.7 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Processing triggers for systemd (229-4ubuntu11) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
mysql-server-5.7
mysql-server
I tried stopping the service, uninstalling, purging, and even removing /etc/mysql and /var/lib/mysql (after backing up, of course).
I'm at a complete loss as to why this is happening now. I can't seem to recover my database data. I've noticed that whenever I do this uninstall/reinstall procedure, it's not asking me for a mysql password, so I wonder if it's not completely uninstalled.
server uninstall mysql
server uninstall mysql
asked Oct 27 '16 at 20:46
jwir3jwir3
1671416
1671416
Even trying to uninstall gives this error. It seems the package is in a weird state.
– jwir3
Oct 27 '16 at 20:49
add a comment |
Even trying to uninstall gives this error. It seems the package is in a weird state.
– jwir3
Oct 27 '16 at 20:49
Even trying to uninstall gives this error. It seems the package is in a weird state.
– jwir3
Oct 27 '16 at 20:49
Even trying to uninstall gives this error. It seems the package is in a weird state.
– jwir3
Oct 27 '16 at 20:49
add a comment |
1 Answer
1
active
oldest
votes
To remove all config files use
apt-get purge mysql-server*
rm -rf /etc/my.cnf /etc/mysql
If you want to delete all databases as well, you need to delete the directory /var/lib/mysql
, too.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f842578%2fhow-can-i-completely-uninstall-mysql-server-and-reinstall%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
To remove all config files use
apt-get purge mysql-server*
rm -rf /etc/my.cnf /etc/mysql
If you want to delete all databases as well, you need to delete the directory /var/lib/mysql
, too.
add a comment |
To remove all config files use
apt-get purge mysql-server*
rm -rf /etc/my.cnf /etc/mysql
If you want to delete all databases as well, you need to delete the directory /var/lib/mysql
, too.
add a comment |
To remove all config files use
apt-get purge mysql-server*
rm -rf /etc/my.cnf /etc/mysql
If you want to delete all databases as well, you need to delete the directory /var/lib/mysql
, too.
To remove all config files use
apt-get purge mysql-server*
rm -rf /etc/my.cnf /etc/mysql
If you want to delete all databases as well, you need to delete the directory /var/lib/mysql
, too.
answered Oct 27 '16 at 20:54
Phillip -Zyan K Lee- StockmannPhillip -Zyan K Lee- Stockmann
1,987620
1,987620
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f842578%2fhow-can-i-completely-uninstall-mysql-server-and-reinstall%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Even trying to uninstall gives this error. It seems the package is in a weird state.
– jwir3
Oct 27 '16 at 20:49