Having trouble installing and removing MySQL in Ubuntu Announcing the arrival of Valued...
Why didn't this character "real die" when they blew their stack out in Altered Carbon?
Should I discuss the type of campaign with my players?
Why am I getting the error "non-boolean type specified in a context where a condition is expected" for this request?
Why are there no cargo aircraft with "flying wing" design?
Check which numbers satisfy the condition [A*B*C = A! + B! + C!]
Sci-Fi book where patients in a coma ward all live in a subconscious world linked together
How to answer "Have you ever been terminated?"
How discoverable are IPv6 addresses and AAAA names by potential attackers?
Storing hydrofluoric acid before the invention of plastics
What does this icon in iOS Stardew Valley mean?
Is there a (better) way to access $wpdb results?
At the end of Thor: Ragnarok why don't the Asgardians turn and head for the Bifrost as per their original plan?
What LEGO pieces have "real-world" functionality?
Book where humans were engineered with genes from animal species to survive hostile planets
Echoing a tail command produces unexpected output?
Withdrew £2800, but only £2000 shows as withdrawn on online banking; what are my obligations?
Why is my conclusion inconsistent with the van't Hoff equation?
Is pollution the main cause of Notre Dame Cathedral's deterioration?
Using audio cues to encourage good posture
What is Arya's weapon design?
Do I really need recursive chmod to restrict access to a folder?
How to run gsettings for another user Ubuntu 18.04.2 LTS
How to bypass password on Windows XP account?
Short Story with Cinderella as a Voo-doo Witch
Having trouble installing and removing MySQL in Ubuntu
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)16.04 upgrade broke mysql-serverUbuntu Trusty 14.04 Mysql 5.6 install not workingError when trying to load mysql to Ubuntu 16.04After upgrade to 16.04 - alternative link error setting up mysql-commonUbuntu server 12.04 dependency issues when attempting updatecannot upgrade kernel and mysql-server after dist upgradeCan not install MySQL on my Ubuntu 12.04MySQL Installation Issues on Ubuntu 15.04Can not install pymol because I cannot install libfreetype6-devMySql Installation problem in dual boot ubuntu 14.04mysql doesn't ask for root password when installingE: Sub-process /usr/bin/dpkg returned an error code (1) when try to execute apt-get install python3-pexpectmysql-server-5.7 package post-installation script subprocess returned error exit status 127
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I have trouble in installing or removing the partly installed mysql-server-5.6 in ubuntu15.04.
The error I am getting was
$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
mysql-server-5.6
The following packages will be upgraded:
mysql-server-5.6
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
22 not fully installed or removed.
Need to get 0 B/5,501 kB of archives.
After this operation, 50.8 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Preconfiguring packages ...
Setting up mysql-common (5.6.24-0ubuntu2) ...
update-alternatives: error: alternative path /etc/mysql/my.cnf.fallback doesn't exist
dpkg: error processing package mysql-common (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
mysql-common
localepurge: Disk space freed in /usr/share/locale: 0 KiB
localepurge: Disk space freed in /usr/share/man: 0 KiB
localepurge: Disk space freed in /usr/share/gnome/help: 0 KiB
localepurge: Disk space freed in /usr/share/omf: 0 KiB
localepurge: Disk space freed in /usr/share/doc/kde/HTML: 0 KiB
Total disk space freed by localepurge: 0 KiB
E: Sub-process /usr/bin/dpkg returned an error code (1)
Can someone help me on this?
14.04 server software-installation mysql webserver
add a comment |
I have trouble in installing or removing the partly installed mysql-server-5.6 in ubuntu15.04.
The error I am getting was
$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
mysql-server-5.6
The following packages will be upgraded:
mysql-server-5.6
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
22 not fully installed or removed.
Need to get 0 B/5,501 kB of archives.
After this operation, 50.8 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Preconfiguring packages ...
Setting up mysql-common (5.6.24-0ubuntu2) ...
update-alternatives: error: alternative path /etc/mysql/my.cnf.fallback doesn't exist
dpkg: error processing package mysql-common (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
mysql-common
localepurge: Disk space freed in /usr/share/locale: 0 KiB
localepurge: Disk space freed in /usr/share/man: 0 KiB
localepurge: Disk space freed in /usr/share/gnome/help: 0 KiB
localepurge: Disk space freed in /usr/share/omf: 0 KiB
localepurge: Disk space freed in /usr/share/doc/kde/HTML: 0 KiB
Total disk space freed by localepurge: 0 KiB
E: Sub-process /usr/bin/dpkg returned an error code (1)
Can someone help me on this?
14.04 server software-installation mysql webserver
Better can remove and hopefully a clean re-install would be fine i think.
– vembutech
Jul 1 '15 at 18:06
I tried this process still i have the problem, ie i am ubable to uninstall or reinstall mysql server
– Shameerariff
Jul 2 '15 at 5:24
1
I tried my level best to find out the cause for the issue. I removed the data from the apt status file and updated the apt, where I noticed the system is experiencing the problem with libgcc1 libc6. I am trying to solve the problem Will keep post the status based on my findings.
– Shameerariff
Jul 2 '15 at 6:03
add a comment |
I have trouble in installing or removing the partly installed mysql-server-5.6 in ubuntu15.04.
The error I am getting was
$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
mysql-server-5.6
The following packages will be upgraded:
mysql-server-5.6
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
22 not fully installed or removed.
Need to get 0 B/5,501 kB of archives.
After this operation, 50.8 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Preconfiguring packages ...
Setting up mysql-common (5.6.24-0ubuntu2) ...
update-alternatives: error: alternative path /etc/mysql/my.cnf.fallback doesn't exist
dpkg: error processing package mysql-common (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
mysql-common
localepurge: Disk space freed in /usr/share/locale: 0 KiB
localepurge: Disk space freed in /usr/share/man: 0 KiB
localepurge: Disk space freed in /usr/share/gnome/help: 0 KiB
localepurge: Disk space freed in /usr/share/omf: 0 KiB
localepurge: Disk space freed in /usr/share/doc/kde/HTML: 0 KiB
Total disk space freed by localepurge: 0 KiB
E: Sub-process /usr/bin/dpkg returned an error code (1)
Can someone help me on this?
14.04 server software-installation mysql webserver
I have trouble in installing or removing the partly installed mysql-server-5.6 in ubuntu15.04.
The error I am getting was
$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
mysql-server-5.6
The following packages will be upgraded:
mysql-server-5.6
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
22 not fully installed or removed.
Need to get 0 B/5,501 kB of archives.
After this operation, 50.8 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Preconfiguring packages ...
Setting up mysql-common (5.6.24-0ubuntu2) ...
update-alternatives: error: alternative path /etc/mysql/my.cnf.fallback doesn't exist
dpkg: error processing package mysql-common (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
mysql-common
localepurge: Disk space freed in /usr/share/locale: 0 KiB
localepurge: Disk space freed in /usr/share/man: 0 KiB
localepurge: Disk space freed in /usr/share/gnome/help: 0 KiB
localepurge: Disk space freed in /usr/share/omf: 0 KiB
localepurge: Disk space freed in /usr/share/doc/kde/HTML: 0 KiB
Total disk space freed by localepurge: 0 KiB
E: Sub-process /usr/bin/dpkg returned an error code (1)
Can someone help me on this?
14.04 server software-installation mysql webserver
14.04 server software-installation mysql webserver
edited Aug 10 '17 at 16:46
Zanna
51.4k13140243
51.4k13140243
asked Jul 1 '15 at 17:42
ShameerariffShameerariff
3491213
3491213
Better can remove and hopefully a clean re-install would be fine i think.
– vembutech
Jul 1 '15 at 18:06
I tried this process still i have the problem, ie i am ubable to uninstall or reinstall mysql server
– Shameerariff
Jul 2 '15 at 5:24
1
I tried my level best to find out the cause for the issue. I removed the data from the apt status file and updated the apt, where I noticed the system is experiencing the problem with libgcc1 libc6. I am trying to solve the problem Will keep post the status based on my findings.
– Shameerariff
Jul 2 '15 at 6:03
add a comment |
Better can remove and hopefully a clean re-install would be fine i think.
– vembutech
Jul 1 '15 at 18:06
I tried this process still i have the problem, ie i am ubable to uninstall or reinstall mysql server
– Shameerariff
Jul 2 '15 at 5:24
1
I tried my level best to find out the cause for the issue. I removed the data from the apt status file and updated the apt, where I noticed the system is experiencing the problem with libgcc1 libc6. I am trying to solve the problem Will keep post the status based on my findings.
– Shameerariff
Jul 2 '15 at 6:03
Better can remove and hopefully a clean re-install would be fine i think.
– vembutech
Jul 1 '15 at 18:06
Better can remove and hopefully a clean re-install would be fine i think.
– vembutech
Jul 1 '15 at 18:06
I tried this process still i have the problem, ie i am ubable to uninstall or reinstall mysql server
– Shameerariff
Jul 2 '15 at 5:24
I tried this process still i have the problem, ie i am ubable to uninstall or reinstall mysql server
– Shameerariff
Jul 2 '15 at 5:24
1
1
I tried my level best to find out the cause for the issue. I removed the data from the apt status file and updated the apt, where I noticed the system is experiencing the problem with libgcc1 libc6. I am trying to solve the problem Will keep post the status based on my findings.
– Shameerariff
Jul 2 '15 at 6:03
I tried my level best to find out the cause for the issue. I removed the data from the apt status file and updated the apt, where I noticed the system is experiencing the problem with libgcc1 libc6. I am trying to solve the problem Will keep post the status based on my findings.
– Shameerariff
Jul 2 '15 at 6:03
add a comment |
9 Answers
9
active
oldest
votes
Try doing a purge, then re-install.
sudo apt-get remove --purge mysql-*
sudo apt-get install mysql-server mysql-client
Update 04.09.2018:
If you have issues uninstalling/installing because MySQL process is live, you can try this first, then above:sudo kill $(pgrep mysql)
I tried this process still i have the problem, ie i am ubable to uninstall or reinstall mysql server
– Shameerariff
Jul 2 '15 at 5:23
The original instructions removed the metapackage, which was a no-op. The new edited instructions work with 16.04.
– mrm
Jul 24 '16 at 16:33
Worked for me on elementary OS.
– MChaker
Dec 18 '16 at 7:41
2
This worked for me only after I checkedps -aef | grep mysqland sent a kill signal to all varieties of running mysqld.
– Charney Kaye
Jan 11 '17 at 20:10
add a comment |
A very simple solution which I (the linux noob) had to dig up... is to create the file.
nano /etc/mysql/my.cnf.fallback
and fill it with the default content from the mysql-common 5.7.11-0ubuntu6 package.
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
!includedir /etc/mysql/conf.d/
found here at apt-browse.org
This is a better answer than the accpeted one because it fixes the actual problem without having to use the brute force approach.
– devius
Jan 30 '18 at 19:04
In my casetouch /etc/mysql/my.cnf.fallbackgot me past the issue.
– oalders
Sep 21 '18 at 1:59
add a comment |
Purge/Reinstall also did not work for me. I found the following "solution":
I could not find mysql.cnf.fallback listed in the "provided files" for mysql-server-5.6 / mysql-client-5.6 nor any additional info about the file.
I copied /etc/mysql/my.cnf to /etc/mysql/my.cnf.fallback (guessing that this would have been a relatively less important "fallback" config file);
/etc/mysql/my.cnf is a symlink, so ls /etc/mysql now shows:
my.cnf.fallback -> /etc/alternatives/my.cnf
my.cnf -> /etc/alternatives/my.cnf
The installation of the package then completed without error (since presumably the "doesn't exist" issue was "solved").
I have not come across any adverse effects (yet).
This sounds great but can you explain the reason for the problem, It would be beneficial for others.
– Shameerariff
Aug 28 '15 at 4:05
add a comment |
I had the same problem while trying to purge mysql-server (5.7.14).
In case that the my.cnf* files are missing, you can re-install the package mysql-common, and afterwards, you can purge both (mysql-server & mysql-common)
These my.cnf* files belong to mysql-common package (see bellow):
$ dpkg -L mysql-common | grep cnf
/etc/mysql/my.cnf.fallback
/etc/mysql/conf.d/mysql.cnf
1. Re-install mysql-common
apt-get install --reinstall mysql-common
Purge mysql-common
apt-get purge mysql-common
add a comment |
I checked my /etc/mysql/ folder and found it to be completely empty other than an empty sub-folder conf.d.
cd /etc/
# you need to delete the empty mysql folder otherwise the ln below creates the link inside the existing mysql folder
sudo rm -r mysql
sudo ln -s ./mysql.bak/ mysql
then (courtesy of this link this link)
sudo dpkg --configure -a
and now all appears okay.
The link above also mentions --force-depends but I did not need this. It also mentions apt-get -f install but again I did not need this.
This was exactly my problem. This fixed it for me.
– Dave Kincaid
Oct 7 '16 at 12:15
add a comment |
As noted by charneykaye in the comments, this approach can fail if there's some mysql processes in the background. I used:
emil-mint-desktop ~ # ps -aef | grep mysql
root 6682 1 0 16:45 ? 00:00:00 sudo mysqld_safe --skip-grant-tables
root 6683 6682 0 16:45 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe --skip-grant-tables
mysql 7046 6683 0 16:45 ? 00:00:01 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --skip-grant-tables --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306 --log-syslog=1 --log-syslog-facility=daemon --log-syslog-tag=
root 21046 9812 0 17:32 pts/5 00:00:00 grep --color=auto mysql
Killed the first 3 processes (the last one is the grep call itself!) using:
kill -9 6682 8883 7046
Then remove everything mysql related:
apt remove --purge mysql-*
apt autoremove
apt autoclean
and then install:
apt install mysql-server
Then it worked.
Versions:
- Mint 18.1 (based on Ubuntu). You will need to substitute
aptforapt-getfor some other versions.
add a comment |
I found an easy solution for that:
First step: apt-get install mysql-common --reinstall
Second step: apt-get install mysql-server --reinstall
And it works!
add a comment |
After trying all the answers above I was able to fix this problem with:
sudo rm /etc/rc5.d/S03mysql
Then was able to run:
sudo apt purge mysql-server mysql-server-5.7 mysql-server-core-5.7
sudo apt-get -f install mysql-server --fix-missing --fix-broken
add a comment |
IMPORTANT NOTE
AFTER PURGING AND REMOVING MYSQL. RESTART THE MACHINE.
I REPEAT "RESTART THE MACHINE"
RESTART IS THE FINAL SOLUTION. I have spent sleepless nights figuring why it's not solving.
New contributor
Zahid L Shaikh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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%2f643251%2fhaving-trouble-installing-and-removing-mysql-in-ubuntu%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
9 Answers
9
active
oldest
votes
9 Answers
9
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try doing a purge, then re-install.
sudo apt-get remove --purge mysql-*
sudo apt-get install mysql-server mysql-client
Update 04.09.2018:
If you have issues uninstalling/installing because MySQL process is live, you can try this first, then above:sudo kill $(pgrep mysql)
I tried this process still i have the problem, ie i am ubable to uninstall or reinstall mysql server
– Shameerariff
Jul 2 '15 at 5:23
The original instructions removed the metapackage, which was a no-op. The new edited instructions work with 16.04.
– mrm
Jul 24 '16 at 16:33
Worked for me on elementary OS.
– MChaker
Dec 18 '16 at 7:41
2
This worked for me only after I checkedps -aef | grep mysqland sent a kill signal to all varieties of running mysqld.
– Charney Kaye
Jan 11 '17 at 20:10
add a comment |
Try doing a purge, then re-install.
sudo apt-get remove --purge mysql-*
sudo apt-get install mysql-server mysql-client
Update 04.09.2018:
If you have issues uninstalling/installing because MySQL process is live, you can try this first, then above:sudo kill $(pgrep mysql)
I tried this process still i have the problem, ie i am ubable to uninstall or reinstall mysql server
– Shameerariff
Jul 2 '15 at 5:23
The original instructions removed the metapackage, which was a no-op. The new edited instructions work with 16.04.
– mrm
Jul 24 '16 at 16:33
Worked for me on elementary OS.
– MChaker
Dec 18 '16 at 7:41
2
This worked for me only after I checkedps -aef | grep mysqland sent a kill signal to all varieties of running mysqld.
– Charney Kaye
Jan 11 '17 at 20:10
add a comment |
Try doing a purge, then re-install.
sudo apt-get remove --purge mysql-*
sudo apt-get install mysql-server mysql-client
Update 04.09.2018:
If you have issues uninstalling/installing because MySQL process is live, you can try this first, then above:sudo kill $(pgrep mysql)
Try doing a purge, then re-install.
sudo apt-get remove --purge mysql-*
sudo apt-get install mysql-server mysql-client
Update 04.09.2018:
If you have issues uninstalling/installing because MySQL process is live, you can try this first, then above:sudo kill $(pgrep mysql)
edited Sep 4 '18 at 8:09
answered Jul 1 '15 at 18:08
sdkkssdkks
1,118189
1,118189
I tried this process still i have the problem, ie i am ubable to uninstall or reinstall mysql server
– Shameerariff
Jul 2 '15 at 5:23
The original instructions removed the metapackage, which was a no-op. The new edited instructions work with 16.04.
– mrm
Jul 24 '16 at 16:33
Worked for me on elementary OS.
– MChaker
Dec 18 '16 at 7:41
2
This worked for me only after I checkedps -aef | grep mysqland sent a kill signal to all varieties of running mysqld.
– Charney Kaye
Jan 11 '17 at 20:10
add a comment |
I tried this process still i have the problem, ie i am ubable to uninstall or reinstall mysql server
– Shameerariff
Jul 2 '15 at 5:23
The original instructions removed the metapackage, which was a no-op. The new edited instructions work with 16.04.
– mrm
Jul 24 '16 at 16:33
Worked for me on elementary OS.
– MChaker
Dec 18 '16 at 7:41
2
This worked for me only after I checkedps -aef | grep mysqland sent a kill signal to all varieties of running mysqld.
– Charney Kaye
Jan 11 '17 at 20:10
I tried this process still i have the problem, ie i am ubable to uninstall or reinstall mysql server
– Shameerariff
Jul 2 '15 at 5:23
I tried this process still i have the problem, ie i am ubable to uninstall or reinstall mysql server
– Shameerariff
Jul 2 '15 at 5:23
The original instructions removed the metapackage, which was a no-op. The new edited instructions work with 16.04.
– mrm
Jul 24 '16 at 16:33
The original instructions removed the metapackage, which was a no-op. The new edited instructions work with 16.04.
– mrm
Jul 24 '16 at 16:33
Worked for me on elementary OS.
– MChaker
Dec 18 '16 at 7:41
Worked for me on elementary OS.
– MChaker
Dec 18 '16 at 7:41
2
2
This worked for me only after I checked
ps -aef | grep mysql and sent a kill signal to all varieties of running mysqld.– Charney Kaye
Jan 11 '17 at 20:10
This worked for me only after I checked
ps -aef | grep mysql and sent a kill signal to all varieties of running mysqld.– Charney Kaye
Jan 11 '17 at 20:10
add a comment |
A very simple solution which I (the linux noob) had to dig up... is to create the file.
nano /etc/mysql/my.cnf.fallback
and fill it with the default content from the mysql-common 5.7.11-0ubuntu6 package.
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
!includedir /etc/mysql/conf.d/
found here at apt-browse.org
This is a better answer than the accpeted one because it fixes the actual problem without having to use the brute force approach.
– devius
Jan 30 '18 at 19:04
In my casetouch /etc/mysql/my.cnf.fallbackgot me past the issue.
– oalders
Sep 21 '18 at 1:59
add a comment |
A very simple solution which I (the linux noob) had to dig up... is to create the file.
nano /etc/mysql/my.cnf.fallback
and fill it with the default content from the mysql-common 5.7.11-0ubuntu6 package.
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
!includedir /etc/mysql/conf.d/
found here at apt-browse.org
This is a better answer than the accpeted one because it fixes the actual problem without having to use the brute force approach.
– devius
Jan 30 '18 at 19:04
In my casetouch /etc/mysql/my.cnf.fallbackgot me past the issue.
– oalders
Sep 21 '18 at 1:59
add a comment |
A very simple solution which I (the linux noob) had to dig up... is to create the file.
nano /etc/mysql/my.cnf.fallback
and fill it with the default content from the mysql-common 5.7.11-0ubuntu6 package.
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
!includedir /etc/mysql/conf.d/
found here at apt-browse.org
A very simple solution which I (the linux noob) had to dig up... is to create the file.
nano /etc/mysql/my.cnf.fallback
and fill it with the default content from the mysql-common 5.7.11-0ubuntu6 package.
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
!includedir /etc/mysql/conf.d/
found here at apt-browse.org
edited Dec 29 '16 at 22:41
Zanna
51.4k13140243
51.4k13140243
answered Dec 29 '16 at 20:51
user636300user636300
11112
11112
This is a better answer than the accpeted one because it fixes the actual problem without having to use the brute force approach.
– devius
Jan 30 '18 at 19:04
In my casetouch /etc/mysql/my.cnf.fallbackgot me past the issue.
– oalders
Sep 21 '18 at 1:59
add a comment |
This is a better answer than the accpeted one because it fixes the actual problem without having to use the brute force approach.
– devius
Jan 30 '18 at 19:04
In my casetouch /etc/mysql/my.cnf.fallbackgot me past the issue.
– oalders
Sep 21 '18 at 1:59
This is a better answer than the accpeted one because it fixes the actual problem without having to use the brute force approach.
– devius
Jan 30 '18 at 19:04
This is a better answer than the accpeted one because it fixes the actual problem without having to use the brute force approach.
– devius
Jan 30 '18 at 19:04
In my case
touch /etc/mysql/my.cnf.fallback got me past the issue.– oalders
Sep 21 '18 at 1:59
In my case
touch /etc/mysql/my.cnf.fallback got me past the issue.– oalders
Sep 21 '18 at 1:59
add a comment |
Purge/Reinstall also did not work for me. I found the following "solution":
I could not find mysql.cnf.fallback listed in the "provided files" for mysql-server-5.6 / mysql-client-5.6 nor any additional info about the file.
I copied /etc/mysql/my.cnf to /etc/mysql/my.cnf.fallback (guessing that this would have been a relatively less important "fallback" config file);
/etc/mysql/my.cnf is a symlink, so ls /etc/mysql now shows:
my.cnf.fallback -> /etc/alternatives/my.cnf
my.cnf -> /etc/alternatives/my.cnf
The installation of the package then completed without error (since presumably the "doesn't exist" issue was "solved").
I have not come across any adverse effects (yet).
This sounds great but can you explain the reason for the problem, It would be beneficial for others.
– Shameerariff
Aug 28 '15 at 4:05
add a comment |
Purge/Reinstall also did not work for me. I found the following "solution":
I could not find mysql.cnf.fallback listed in the "provided files" for mysql-server-5.6 / mysql-client-5.6 nor any additional info about the file.
I copied /etc/mysql/my.cnf to /etc/mysql/my.cnf.fallback (guessing that this would have been a relatively less important "fallback" config file);
/etc/mysql/my.cnf is a symlink, so ls /etc/mysql now shows:
my.cnf.fallback -> /etc/alternatives/my.cnf
my.cnf -> /etc/alternatives/my.cnf
The installation of the package then completed without error (since presumably the "doesn't exist" issue was "solved").
I have not come across any adverse effects (yet).
This sounds great but can you explain the reason for the problem, It would be beneficial for others.
– Shameerariff
Aug 28 '15 at 4:05
add a comment |
Purge/Reinstall also did not work for me. I found the following "solution":
I could not find mysql.cnf.fallback listed in the "provided files" for mysql-server-5.6 / mysql-client-5.6 nor any additional info about the file.
I copied /etc/mysql/my.cnf to /etc/mysql/my.cnf.fallback (guessing that this would have been a relatively less important "fallback" config file);
/etc/mysql/my.cnf is a symlink, so ls /etc/mysql now shows:
my.cnf.fallback -> /etc/alternatives/my.cnf
my.cnf -> /etc/alternatives/my.cnf
The installation of the package then completed without error (since presumably the "doesn't exist" issue was "solved").
I have not come across any adverse effects (yet).
Purge/Reinstall also did not work for me. I found the following "solution":
I could not find mysql.cnf.fallback listed in the "provided files" for mysql-server-5.6 / mysql-client-5.6 nor any additional info about the file.
I copied /etc/mysql/my.cnf to /etc/mysql/my.cnf.fallback (guessing that this would have been a relatively less important "fallback" config file);
/etc/mysql/my.cnf is a symlink, so ls /etc/mysql now shows:
my.cnf.fallback -> /etc/alternatives/my.cnf
my.cnf -> /etc/alternatives/my.cnf
The installation of the package then completed without error (since presumably the "doesn't exist" issue was "solved").
I have not come across any adverse effects (yet).
edited Oct 2 '15 at 6:23
kos
26.1k971122
26.1k971122
answered Aug 25 '15 at 9:41
Jungle EditorJungle Editor
1415
1415
This sounds great but can you explain the reason for the problem, It would be beneficial for others.
– Shameerariff
Aug 28 '15 at 4:05
add a comment |
This sounds great but can you explain the reason for the problem, It would be beneficial for others.
– Shameerariff
Aug 28 '15 at 4:05
This sounds great but can you explain the reason for the problem, It would be beneficial for others.
– Shameerariff
Aug 28 '15 at 4:05
This sounds great but can you explain the reason for the problem, It would be beneficial for others.
– Shameerariff
Aug 28 '15 at 4:05
add a comment |
I had the same problem while trying to purge mysql-server (5.7.14).
In case that the my.cnf* files are missing, you can re-install the package mysql-common, and afterwards, you can purge both (mysql-server & mysql-common)
These my.cnf* files belong to mysql-common package (see bellow):
$ dpkg -L mysql-common | grep cnf
/etc/mysql/my.cnf.fallback
/etc/mysql/conf.d/mysql.cnf
1. Re-install mysql-common
apt-get install --reinstall mysql-common
Purge mysql-common
apt-get purge mysql-common
add a comment |
I had the same problem while trying to purge mysql-server (5.7.14).
In case that the my.cnf* files are missing, you can re-install the package mysql-common, and afterwards, you can purge both (mysql-server & mysql-common)
These my.cnf* files belong to mysql-common package (see bellow):
$ dpkg -L mysql-common | grep cnf
/etc/mysql/my.cnf.fallback
/etc/mysql/conf.d/mysql.cnf
1. Re-install mysql-common
apt-get install --reinstall mysql-common
Purge mysql-common
apt-get purge mysql-common
add a comment |
I had the same problem while trying to purge mysql-server (5.7.14).
In case that the my.cnf* files are missing, you can re-install the package mysql-common, and afterwards, you can purge both (mysql-server & mysql-common)
These my.cnf* files belong to mysql-common package (see bellow):
$ dpkg -L mysql-common | grep cnf
/etc/mysql/my.cnf.fallback
/etc/mysql/conf.d/mysql.cnf
1. Re-install mysql-common
apt-get install --reinstall mysql-common
Purge mysql-common
apt-get purge mysql-common
I had the same problem while trying to purge mysql-server (5.7.14).
In case that the my.cnf* files are missing, you can re-install the package mysql-common, and afterwards, you can purge both (mysql-server & mysql-common)
These my.cnf* files belong to mysql-common package (see bellow):
$ dpkg -L mysql-common | grep cnf
/etc/mysql/my.cnf.fallback
/etc/mysql/conf.d/mysql.cnf
1. Re-install mysql-common
apt-get install --reinstall mysql-common
Purge mysql-common
apt-get purge mysql-common
answered Aug 30 '16 at 20:10
ivanleonczivanleoncz
1459
1459
add a comment |
add a comment |
I checked my /etc/mysql/ folder and found it to be completely empty other than an empty sub-folder conf.d.
cd /etc/
# you need to delete the empty mysql folder otherwise the ln below creates the link inside the existing mysql folder
sudo rm -r mysql
sudo ln -s ./mysql.bak/ mysql
then (courtesy of this link this link)
sudo dpkg --configure -a
and now all appears okay.
The link above also mentions --force-depends but I did not need this. It also mentions apt-get -f install but again I did not need this.
This was exactly my problem. This fixed it for me.
– Dave Kincaid
Oct 7 '16 at 12:15
add a comment |
I checked my /etc/mysql/ folder and found it to be completely empty other than an empty sub-folder conf.d.
cd /etc/
# you need to delete the empty mysql folder otherwise the ln below creates the link inside the existing mysql folder
sudo rm -r mysql
sudo ln -s ./mysql.bak/ mysql
then (courtesy of this link this link)
sudo dpkg --configure -a
and now all appears okay.
The link above also mentions --force-depends but I did not need this. It also mentions apt-get -f install but again I did not need this.
This was exactly my problem. This fixed it for me.
– Dave Kincaid
Oct 7 '16 at 12:15
add a comment |
I checked my /etc/mysql/ folder and found it to be completely empty other than an empty sub-folder conf.d.
cd /etc/
# you need to delete the empty mysql folder otherwise the ln below creates the link inside the existing mysql folder
sudo rm -r mysql
sudo ln -s ./mysql.bak/ mysql
then (courtesy of this link this link)
sudo dpkg --configure -a
and now all appears okay.
The link above also mentions --force-depends but I did not need this. It also mentions apt-get -f install but again I did not need this.
I checked my /etc/mysql/ folder and found it to be completely empty other than an empty sub-folder conf.d.
cd /etc/
# you need to delete the empty mysql folder otherwise the ln below creates the link inside the existing mysql folder
sudo rm -r mysql
sudo ln -s ./mysql.bak/ mysql
then (courtesy of this link this link)
sudo dpkg --configure -a
and now all appears okay.
The link above also mentions --force-depends but I did not need this. It also mentions apt-get -f install but again I did not need this.
edited Apr 13 '17 at 12:37
Community♦
1
1
answered Jun 28 '16 at 20:48
northern-bradleynorthern-bradley
1916
1916
This was exactly my problem. This fixed it for me.
– Dave Kincaid
Oct 7 '16 at 12:15
add a comment |
This was exactly my problem. This fixed it for me.
– Dave Kincaid
Oct 7 '16 at 12:15
This was exactly my problem. This fixed it for me.
– Dave Kincaid
Oct 7 '16 at 12:15
This was exactly my problem. This fixed it for me.
– Dave Kincaid
Oct 7 '16 at 12:15
add a comment |
As noted by charneykaye in the comments, this approach can fail if there's some mysql processes in the background. I used:
emil-mint-desktop ~ # ps -aef | grep mysql
root 6682 1 0 16:45 ? 00:00:00 sudo mysqld_safe --skip-grant-tables
root 6683 6682 0 16:45 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe --skip-grant-tables
mysql 7046 6683 0 16:45 ? 00:00:01 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --skip-grant-tables --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306 --log-syslog=1 --log-syslog-facility=daemon --log-syslog-tag=
root 21046 9812 0 17:32 pts/5 00:00:00 grep --color=auto mysql
Killed the first 3 processes (the last one is the grep call itself!) using:
kill -9 6682 8883 7046
Then remove everything mysql related:
apt remove --purge mysql-*
apt autoremove
apt autoclean
and then install:
apt install mysql-server
Then it worked.
Versions:
- Mint 18.1 (based on Ubuntu). You will need to substitute
aptforapt-getfor some other versions.
add a comment |
As noted by charneykaye in the comments, this approach can fail if there's some mysql processes in the background. I used:
emil-mint-desktop ~ # ps -aef | grep mysql
root 6682 1 0 16:45 ? 00:00:00 sudo mysqld_safe --skip-grant-tables
root 6683 6682 0 16:45 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe --skip-grant-tables
mysql 7046 6683 0 16:45 ? 00:00:01 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --skip-grant-tables --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306 --log-syslog=1 --log-syslog-facility=daemon --log-syslog-tag=
root 21046 9812 0 17:32 pts/5 00:00:00 grep --color=auto mysql
Killed the first 3 processes (the last one is the grep call itself!) using:
kill -9 6682 8883 7046
Then remove everything mysql related:
apt remove --purge mysql-*
apt autoremove
apt autoclean
and then install:
apt install mysql-server
Then it worked.
Versions:
- Mint 18.1 (based on Ubuntu). You will need to substitute
aptforapt-getfor some other versions.
add a comment |
As noted by charneykaye in the comments, this approach can fail if there's some mysql processes in the background. I used:
emil-mint-desktop ~ # ps -aef | grep mysql
root 6682 1 0 16:45 ? 00:00:00 sudo mysqld_safe --skip-grant-tables
root 6683 6682 0 16:45 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe --skip-grant-tables
mysql 7046 6683 0 16:45 ? 00:00:01 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --skip-grant-tables --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306 --log-syslog=1 --log-syslog-facility=daemon --log-syslog-tag=
root 21046 9812 0 17:32 pts/5 00:00:00 grep --color=auto mysql
Killed the first 3 processes (the last one is the grep call itself!) using:
kill -9 6682 8883 7046
Then remove everything mysql related:
apt remove --purge mysql-*
apt autoremove
apt autoclean
and then install:
apt install mysql-server
Then it worked.
Versions:
- Mint 18.1 (based on Ubuntu). You will need to substitute
aptforapt-getfor some other versions.
As noted by charneykaye in the comments, this approach can fail if there's some mysql processes in the background. I used:
emil-mint-desktop ~ # ps -aef | grep mysql
root 6682 1 0 16:45 ? 00:00:00 sudo mysqld_safe --skip-grant-tables
root 6683 6682 0 16:45 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe --skip-grant-tables
mysql 7046 6683 0 16:45 ? 00:00:01 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --skip-grant-tables --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306 --log-syslog=1 --log-syslog-facility=daemon --log-syslog-tag=
root 21046 9812 0 17:32 pts/5 00:00:00 grep --color=auto mysql
Killed the first 3 processes (the last one is the grep call itself!) using:
kill -9 6682 8883 7046
Then remove everything mysql related:
apt remove --purge mysql-*
apt autoremove
apt autoclean
and then install:
apt install mysql-server
Then it worked.
Versions:
- Mint 18.1 (based on Ubuntu). You will need to substitute
aptforapt-getfor some other versions.
answered Jun 23 '17 at 21:43
DeleetDeleet
1307
1307
add a comment |
add a comment |
I found an easy solution for that:
First step: apt-get install mysql-common --reinstall
Second step: apt-get install mysql-server --reinstall
And it works!
add a comment |
I found an easy solution for that:
First step: apt-get install mysql-common --reinstall
Second step: apt-get install mysql-server --reinstall
And it works!
add a comment |
I found an easy solution for that:
First step: apt-get install mysql-common --reinstall
Second step: apt-get install mysql-server --reinstall
And it works!
I found an easy solution for that:
First step: apt-get install mysql-common --reinstall
Second step: apt-get install mysql-server --reinstall
And it works!
edited Oct 9 '17 at 11:32
Russo
1,4562720
1,4562720
answered Oct 9 '17 at 11:01
alefenalefen
1
1
add a comment |
add a comment |
After trying all the answers above I was able to fix this problem with:
sudo rm /etc/rc5.d/S03mysql
Then was able to run:
sudo apt purge mysql-server mysql-server-5.7 mysql-server-core-5.7
sudo apt-get -f install mysql-server --fix-missing --fix-broken
add a comment |
After trying all the answers above I was able to fix this problem with:
sudo rm /etc/rc5.d/S03mysql
Then was able to run:
sudo apt purge mysql-server mysql-server-5.7 mysql-server-core-5.7
sudo apt-get -f install mysql-server --fix-missing --fix-broken
add a comment |
After trying all the answers above I was able to fix this problem with:
sudo rm /etc/rc5.d/S03mysql
Then was able to run:
sudo apt purge mysql-server mysql-server-5.7 mysql-server-core-5.7
sudo apt-get -f install mysql-server --fix-missing --fix-broken
After trying all the answers above I was able to fix this problem with:
sudo rm /etc/rc5.d/S03mysql
Then was able to run:
sudo apt purge mysql-server mysql-server-5.7 mysql-server-core-5.7
sudo apt-get -f install mysql-server --fix-missing --fix-broken
answered Nov 29 '17 at 8:47
Kang the ConquerorKang the Conqueror
11
11
add a comment |
add a comment |
IMPORTANT NOTE
AFTER PURGING AND REMOVING MYSQL. RESTART THE MACHINE.
I REPEAT "RESTART THE MACHINE"
RESTART IS THE FINAL SOLUTION. I have spent sleepless nights figuring why it's not solving.
New contributor
Zahid L Shaikh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
IMPORTANT NOTE
AFTER PURGING AND REMOVING MYSQL. RESTART THE MACHINE.
I REPEAT "RESTART THE MACHINE"
RESTART IS THE FINAL SOLUTION. I have spent sleepless nights figuring why it's not solving.
New contributor
Zahid L Shaikh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
IMPORTANT NOTE
AFTER PURGING AND REMOVING MYSQL. RESTART THE MACHINE.
I REPEAT "RESTART THE MACHINE"
RESTART IS THE FINAL SOLUTION. I have spent sleepless nights figuring why it's not solving.
New contributor
Zahid L Shaikh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
IMPORTANT NOTE
AFTER PURGING AND REMOVING MYSQL. RESTART THE MACHINE.
I REPEAT "RESTART THE MACHINE"
RESTART IS THE FINAL SOLUTION. I have spent sleepless nights figuring why it's not solving.
New contributor
Zahid L Shaikh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Zahid L Shaikh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered 5 mins ago
Zahid L ShaikhZahid L Shaikh
1
1
New contributor
Zahid L Shaikh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Zahid L Shaikh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Zahid L Shaikh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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%2f643251%2fhaving-trouble-installing-and-removing-mysql-in-ubuntu%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
Better can remove and hopefully a clean re-install would be fine i think.
– vembutech
Jul 1 '15 at 18:06
I tried this process still i have the problem, ie i am ubable to uninstall or reinstall mysql server
– Shameerariff
Jul 2 '15 at 5:24
1
I tried my level best to find out the cause for the issue. I removed the data from the apt status file and updated the apt, where I noticed the system is experiencing the problem with libgcc1 libc6. I am trying to solve the problem Will keep post the status based on my findings.
– Shameerariff
Jul 2 '15 at 6:03