16.04 upgrade broke mysql-server The 2019 Stack Overflow Developer Survey Results Are InCan't reinstall mysql : mysql-server depends on mysql-server-5.7 however: Package mysql-server-5.7 is not configured yetcannot upgrade ubuntu 16.04 - - mysql dependencies problemMySQL won't start - error Job for mysql.service failed because the control process exited with error code.TextBox_append_text_with_encoding() takes exactly 3 arguments (4 given)Dependency problems with apache2, mysql-common, libmysqlclient20:amd64 and mysql-client-5.7Ubuntu 16.04: Error while performing installing (sudo apt install mysql-server)mysql installation errorAfter upgrade to 16.04 - alternative link error setting up mysql-commonMysql error when installingInstall MySql 5.6 on Ubuntu 16.04cannot upgrade kernel and mysql-server after dist upgradeMySQL Installation Issues on Ubuntu 15.04Nginx installation error in Ubuntu 16.04mysql doesn't ask for root password when installingmysql-server-5.7 configure failsmysql-server-5.5 ErrorUnable to install MariaDB on circleCI ? Problems with dpkg.Error While removing corrupted mysqlmysql-server-5.7 package post-installation script subprocess returned error exit status 127Systemd broken after upgrade 18.04 -> 18.10

Is Cinnamon a desktop environment or a window manager? (Or both?)

Keeping a retro style to sci-fi spaceships?

For what reasons would an animal species NOT cross a *horizontal* land bridge?

What is this business jet?

Is it safe to harvest rainwater that fell on solar panels?

What does Linus Torvalds mean when he says that Git "never ever" tracks a file?

Loose spokes after only a few rides

What do I do when my TA workload is more than expected?

Mathematics of imaging the black hole

How much of the clove should I use when using big garlic heads?

Is there a way to generate a uniformly distributed point on a sphere from a fixed amount of random real numbers?

Old scifi movie from the 50s or 60s with men in solid red uniforms who interrogate a spy from the past

Dropping list elements from nested list after evaluation

If I score a critical hit on an 18 or higher, what are my chances of getting a critical hit if I roll 3d20?

Will it cause any balance problems to have PCs level up and gain the benefits of a long rest mid-fight?

How to translate "being like"?

Why was M87 targeted for the Event Horizon Telescope instead of Sagittarius A*?

How to support a colleague who finds meetings extremely tiring?

Can there be female White Walkers?

Are spiders unable to hurt humans, especially very small spiders?

Why couldn't they take pictures of a closer black hole?

What to do when moving next to a bird sanctuary with a loosely-domesticated cat?

How to notate time signature switching consistently every measure

Output the Arecibo Message



16.04 upgrade broke mysql-server



The 2019 Stack Overflow Developer Survey Results Are InCan't reinstall mysql : mysql-server depends on mysql-server-5.7 however: Package mysql-server-5.7 is not configured yetcannot upgrade ubuntu 16.04 - - mysql dependencies problemMySQL won't start - error Job for mysql.service failed because the control process exited with error code.TextBox_append_text_with_encoding() takes exactly 3 arguments (4 given)Dependency problems with apache2, mysql-common, libmysqlclient20:amd64 and mysql-client-5.7Ubuntu 16.04: Error while performing installing (sudo apt install mysql-server)mysql installation errorAfter upgrade to 16.04 - alternative link error setting up mysql-commonMysql error when installingInstall MySql 5.6 on Ubuntu 16.04cannot upgrade kernel and mysql-server after dist upgradeMySQL Installation Issues on Ubuntu 15.04Nginx installation error in Ubuntu 16.04mysql doesn't ask for root password when installingmysql-server-5.7 configure failsmysql-server-5.5 ErrorUnable to install MariaDB on circleCI ? Problems with dpkg.Error While removing corrupted mysqlmysql-server-5.7 package post-installation script subprocess returned error exit status 127Systemd broken after upgrade 18.04 -> 18.10



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








123















My overall upgrade went well, but I am left with a critically lingering issue of mysql-server not being able to install itself, and nothing I am trying gets it to work.



This is the error I see when trying to install/reinstall it:



Setting up mysql-server-5.7 (5.7.11-0ubuntu6) ...
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
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
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for systemd (229-4ubuntu4) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)


I've tried completely removing it, though doing so attempts to install MariaDB because of dependencies (?). Any suggestions on what I can do to fix this would be most welcome.



EDIT:
Looks like I'm not the only one: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1573279










share|improve this question
























  • I have same problem here.

    – KernelPanic
    Apr 23 '16 at 7:46






  • 1





    Had to uninstall phpmyadmin, which was causing the dependency problems somehow. After reinstalling, everything is working fine again.

    – Hinrich
    Apr 23 '17 at 17:39






  • 1





    do-release-upgrade from Ubuntu 14 to 16 performs an unsupported upgrade from MySQL 5.5 to 5.7, so it is expected MySQL is broken after, as reported here: bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/…

    – Marco Marsala
    Oct 24 '17 at 5:24







  • 1





    @MarcoMarsala I don't know if we can say it is expected for MySQL to be broken after the Ubuntu 14 to 16 upgrade, though I suppose it depends on your perspective. To the average user, it is certainly not expected to have an LTS upgrade break something like MySQL. It is surprising that was not caught during testing, though.

    – TheGremlyn
    Oct 24 '17 at 12:51











  • apt install phpmyadmin --reinstall fixed the above with no need to touch mysql after... go figure

    – Andy
    2 days ago

















123















My overall upgrade went well, but I am left with a critically lingering issue of mysql-server not being able to install itself, and nothing I am trying gets it to work.



This is the error I see when trying to install/reinstall it:



Setting up mysql-server-5.7 (5.7.11-0ubuntu6) ...
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
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
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for systemd (229-4ubuntu4) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)


I've tried completely removing it, though doing so attempts to install MariaDB because of dependencies (?). Any suggestions on what I can do to fix this would be most welcome.



EDIT:
Looks like I'm not the only one: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1573279










share|improve this question
























  • I have same problem here.

    – KernelPanic
    Apr 23 '16 at 7:46






  • 1





    Had to uninstall phpmyadmin, which was causing the dependency problems somehow. After reinstalling, everything is working fine again.

    – Hinrich
    Apr 23 '17 at 17:39






  • 1





    do-release-upgrade from Ubuntu 14 to 16 performs an unsupported upgrade from MySQL 5.5 to 5.7, so it is expected MySQL is broken after, as reported here: bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/…

    – Marco Marsala
    Oct 24 '17 at 5:24







  • 1





    @MarcoMarsala I don't know if we can say it is expected for MySQL to be broken after the Ubuntu 14 to 16 upgrade, though I suppose it depends on your perspective. To the average user, it is certainly not expected to have an LTS upgrade break something like MySQL. It is surprising that was not caught during testing, though.

    – TheGremlyn
    Oct 24 '17 at 12:51











  • apt install phpmyadmin --reinstall fixed the above with no need to touch mysql after... go figure

    – Andy
    2 days ago













123












123








123


42






My overall upgrade went well, but I am left with a critically lingering issue of mysql-server not being able to install itself, and nothing I am trying gets it to work.



This is the error I see when trying to install/reinstall it:



Setting up mysql-server-5.7 (5.7.11-0ubuntu6) ...
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
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
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for systemd (229-4ubuntu4) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)


I've tried completely removing it, though doing so attempts to install MariaDB because of dependencies (?). Any suggestions on what I can do to fix this would be most welcome.



EDIT:
Looks like I'm not the only one: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1573279










share|improve this question
















My overall upgrade went well, but I am left with a critically lingering issue of mysql-server not being able to install itself, and nothing I am trying gets it to work.



This is the error I see when trying to install/reinstall it:



Setting up mysql-server-5.7 (5.7.11-0ubuntu6) ...
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
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
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for systemd (229-4ubuntu4) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)


I've tried completely removing it, though doing so attempts to install MariaDB because of dependencies (?). Any suggestions on what I can do to fix this would be most welcome.



EDIT:
Looks like I'm not the only one: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1573279







upgrade mysql 16.04






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 22 '16 at 18:23







TheGremlyn

















asked Apr 22 '16 at 17:53









TheGremlynTheGremlyn

1,91931015




1,91931015












  • I have same problem here.

    – KernelPanic
    Apr 23 '16 at 7:46






  • 1





    Had to uninstall phpmyadmin, which was causing the dependency problems somehow. After reinstalling, everything is working fine again.

    – Hinrich
    Apr 23 '17 at 17:39






  • 1





    do-release-upgrade from Ubuntu 14 to 16 performs an unsupported upgrade from MySQL 5.5 to 5.7, so it is expected MySQL is broken after, as reported here: bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/…

    – Marco Marsala
    Oct 24 '17 at 5:24







  • 1





    @MarcoMarsala I don't know if we can say it is expected for MySQL to be broken after the Ubuntu 14 to 16 upgrade, though I suppose it depends on your perspective. To the average user, it is certainly not expected to have an LTS upgrade break something like MySQL. It is surprising that was not caught during testing, though.

    – TheGremlyn
    Oct 24 '17 at 12:51











  • apt install phpmyadmin --reinstall fixed the above with no need to touch mysql after... go figure

    – Andy
    2 days ago

















  • I have same problem here.

    – KernelPanic
    Apr 23 '16 at 7:46






  • 1





    Had to uninstall phpmyadmin, which was causing the dependency problems somehow. After reinstalling, everything is working fine again.

    – Hinrich
    Apr 23 '17 at 17:39






  • 1





    do-release-upgrade from Ubuntu 14 to 16 performs an unsupported upgrade from MySQL 5.5 to 5.7, so it is expected MySQL is broken after, as reported here: bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/…

    – Marco Marsala
    Oct 24 '17 at 5:24







  • 1





    @MarcoMarsala I don't know if we can say it is expected for MySQL to be broken after the Ubuntu 14 to 16 upgrade, though I suppose it depends on your perspective. To the average user, it is certainly not expected to have an LTS upgrade break something like MySQL. It is surprising that was not caught during testing, though.

    – TheGremlyn
    Oct 24 '17 at 12:51











  • apt install phpmyadmin --reinstall fixed the above with no need to touch mysql after... go figure

    – Andy
    2 days ago
















I have same problem here.

– KernelPanic
Apr 23 '16 at 7:46





I have same problem here.

– KernelPanic
Apr 23 '16 at 7:46




1




1





Had to uninstall phpmyadmin, which was causing the dependency problems somehow. After reinstalling, everything is working fine again.

– Hinrich
Apr 23 '17 at 17:39





Had to uninstall phpmyadmin, which was causing the dependency problems somehow. After reinstalling, everything is working fine again.

– Hinrich
Apr 23 '17 at 17:39




1




1





do-release-upgrade from Ubuntu 14 to 16 performs an unsupported upgrade from MySQL 5.5 to 5.7, so it is expected MySQL is broken after, as reported here: bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/…

– Marco Marsala
Oct 24 '17 at 5:24






do-release-upgrade from Ubuntu 14 to 16 performs an unsupported upgrade from MySQL 5.5 to 5.7, so it is expected MySQL is broken after, as reported here: bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/…

– Marco Marsala
Oct 24 '17 at 5:24





1




1





@MarcoMarsala I don't know if we can say it is expected for MySQL to be broken after the Ubuntu 14 to 16 upgrade, though I suppose it depends on your perspective. To the average user, it is certainly not expected to have an LTS upgrade break something like MySQL. It is surprising that was not caught during testing, though.

– TheGremlyn
Oct 24 '17 at 12:51





@MarcoMarsala I don't know if we can say it is expected for MySQL to be broken after the Ubuntu 14 to 16 upgrade, though I suppose it depends on your perspective. To the average user, it is certainly not expected to have an LTS upgrade break something like MySQL. It is surprising that was not caught during testing, though.

– TheGremlyn
Oct 24 '17 at 12:51













apt install phpmyadmin --reinstall fixed the above with no need to touch mysql after... go figure

– Andy
2 days ago





apt install phpmyadmin --reinstall fixed the above with no need to touch mysql after... go figure

– Andy
2 days ago










9 Answers
9






active

oldest

votes


















116














The instructions @andrew-beerman posted are on the right track, though they aren't quite clear to me and seem to recommend more than is necessary. I pieced together the answer from the above and a helpful post in the bug thread.



These are the steps I took to correct this:




  1. Back up your my.cnf file in /etc/mysql and remove or rename it



    sudo mv /etc/mysql/my.cnf /etc/mysql/my.cnf.bak



  2. Remove the folder /etc/mysql/mysql.conf.d/ using



    sudo rm -r /etc/mysql/mysql.conf.d/



  3. Verify you don't have a my.cnf file stashed somewhere else (I did in my home dir!) or in /etc/alternatives/my.cnf use



    sudo find / -name my.cnf



  4. Backup and remove /etc/mysql/debian.cnf files (not sure if needed, but just in case)



    sudo mv /etc/mysql/debian.cnf /etc/mysql/debian.cnf.bak
    sudo apt purge mysql-server mysql-server-5.7 mysql-server-core-5.7
    sudo apt install mysql-server



  5. In case your syslog shows an error like "mysqld: Can't read dir of '/etc/mysql/conf.d/'" create a symbolic link:



    sudo ln -s /etc/mysql/mysql.conf.d /etc/mysql/conf.d


    Then the service should be able to start with sudo service mysql start.



That got it working!






share|improve this answer




















  • 16





    after all these operations (I did it before) I still have same error issues...

    – Sergii P
    Apr 29 '16 at 14:05






  • 5





    You have to remove every my.cnf.* from the /etc/mysql directory. Look for my.cnf.backup, my.cnf.fallback and my.cnf.migrated - all of these files have to be removed too (backup first!)

    – hitzi
    May 3 '16 at 8:51






  • 8





    @SergiiP sudo find / -name "my.cnf" might come in handy.

    – starbeamrainbowlabs
    May 14 '16 at 11:31






  • 1





    mysql-server-core- should be mysql-server-core-5.7. Otherwise worked like a charm. Thank you!

    – David Tay
    May 20 '16 at 12:56






  • 1





    +1. You've made my day! Also morning and evening! I was stuck.

    – Max Yudin
    Jun 7 '16 at 17:44


















55














Today I got the same problem, after trying many solutions i found that the problem was the command sudo systemctl disable mysql.service that i used to disable MySQL auto starting, so to get it working i re-enabled again MySQL server using the command sudo systemctl enable mysql.service and run again the upgrade process and it terminated perfectly.






share|improve this answer


















  • 5





    I ran in to this same problem and the same fix worked for me.

    – Allen
    Apr 26 '16 at 15:13






  • 5





    Worked for me. Did every solution here, mysql worked after this one.

    – Błażej Michalik
    Apr 29 '16 at 14:51






  • 5





    Same here - this should be top post.

    – a1phanumeric
    Sep 15 '16 at 14:32






  • 2





    Worked for me too! Thank you so much. Just to be explicit, run: sudo systemctl enable mysql.service and after that run sudo apt install -f.

    – Fernando Paladini
    Jan 25 '17 at 0:03












  • This is all I had to do. I had disabled autostart like described by @naruto. I enabled autostart and run "sudo apt upgrade". Now fixed. Should be top answer. This is a much simpler, more standard and less trouble prone solution.

    – Jack Holt
    Aug 7 '17 at 16:00



















19














Your error message contains this line:



subprocess installed post-installation script returned error exit status 1


However, this installed post-installation script is not mentioned by name. After much tinkering, I found out that its name is (in my case) /var/lib/dpkg/info/mysql-server-5.7.postinst.



Open this file with sudo vi /var/lib/dpkg/info/mysql-server-5.7.postinst, or your preferred editor.



At the top, change line 3 (or so): set -e to set -x, save the file. (option -e is "exit on errors", -x means "explicitly show command executed", presumably)



Run sudo dpkg --configure -a --log /tmp/dpkg.log
(the --log option is optional). You can also simply run apt upgrade if you know it'll be the only package that will be upgraded.



Now you get verbose output of the mysql-server-5.7.postinst bash script, and you can figure out what's wrong.



In my case it unsuccessfully tried to (re-)run mysql_upgrade, but that was not needed for my customized mysql installation. I was sure I've run it manually before, successfully, and all was well.



So I commmented out line 321 (for older mysqld releases try line 281),



#mysql_upgrade --defaults-file=/etc/mysql/debian.cnf || result=$?



and the command that has failed before, sudo apt upgrade (run it again), finished successfully, and dpkg removed the error status for this package.



Now you can set back the set -x to set -e (mentioned above). And optionally uncomment the mysql-upgrade line.



Extra work might be required if you have moved your mysql data partition to a nonstandard location. I moved mine from /var/lib/mysql/data to a different drive via symlink. Then you might have to remove the symbolic link temporarily, before the postinst script manipulation. Then re-create it after running the package upgrade.



After the next minor version upgrade of the mysqld debian package, this problem with the /var/lib/dpkg/info/mysql-server-5.7.postinst script can show up again.






share|improve this answer

























  • I ended up purging everything and then downloading the community mysql-server version and manually installing from here: dev.mysql.com/downloads/mysql

    – RyanNerd
    Sep 1 '16 at 19:34











  • Exactly the same thing happened to me, and your steps solved it to. Bur for me my mysql_upgrade call was on line 320. Can you explain why it return a non-zero value when called from postinst script?

    – emiliopedrollo
    Sep 24 '16 at 18:28












  • @emiliopedrollo No I can't explain here. But I think the line number is now 320 because recently the package maintainers have augmented the postinstall script, I have observed the same thing the other day, during the last run of the software-updater (which included a new mysql-deb-package).

    – knb
    Sep 24 '16 at 19:25












  • Thanks! With set -e I was able to work out the exact problem - MySQL didn't have access for the ubuntu system user specified in /etc/mysql/debian.cnf . So I added this user to MySQL and granted privileges, ran dpkg again and it worked!

    – Allen Hamilton
    Apr 24 '17 at 5:17



















17














The instructions here fixed it on my server: https://bugs.mysql.com/bug.php?id=72722




I can understand the pain of having your system in inconsistent state
but lets not worry about the whole situation and take it step by step
to get the system clean.



First lets see the current state of all the mysql packages on machine
using: dpkg -l | grep mysql (Please paste the output excluding last
column)



The first column denotes the current status of the package. Here are
the possible options:



ii) Installed rc) Removed config-files kept (This should be the state
of all the packages you have removed with 'apt-get remove' that does
not remove config-files under /etc)



For this to work, you will need to run 'apt-get purge ' till
you do not see any packages in the above list.



Please remember that some non-mysql-server packages like
python-mysql.connector and python-mysqldb, if installed, need not be
removed as they do not have any affect on this situation but if
removed might cause trouble to applications using them.



We will definitely try to re-visit our docs to see how can we
safeguard users from getting into this trouble. Thanks for sharing
your feedback in detail with us.







share|improve this answer


















  • 2





    Thanks for dpkg -l | grep mysql . It helped to understand the direction.

    – Max Yudin
    Jun 7 '16 at 17:47


















3














In my case, with strace, I saw that /var/run/mysqld/ didn't exist and mysqld can't create the file mysqld.sock.



These commands solved my problem:



mkdir /var/run/mysqld
chown mysql.mysql /var/run/mysqld
chmod 700 /var/run/mysqld


Now:



systemctl start mysql


And mysql works again :)






share|improve this answer























  • I suggest you add these lines to /usr/share/mysql/mysql-systemd-start starting at line 25, then you won't have to recreate this directory after every reboot (sorry the line returns don't work in this comment): if [ ! -d /run/msyqld ]; then mkdir -p -m0755 /run/mysqld || echo "Unable to create /run/mysqld"; exit 1; chown mysql:mysql /run/mysqld || echo "Unable to chown /run/mysqld"; exit 1; fi

    – scoobydoo
    Jun 30 '16 at 14:44



















3














In my case I could solv the problem by adding



# Allow log file access
/home/system/var/log/mysql.err rw,
/home/system/var/log/mysql.log rw,
/home/system/var/log/mysql/ r,
/home/system/var/log/mysql/** rw,


to /etc/apparmor.d/local/usr.sbin.mysqld



For more details take a look at my answer (by ChristophS) at stackoverflow.






share|improve this answer
































    1














    None of the answers on this page worked for me.



    I ended up going to the Oracle downloads page, downloading mysql-apt-config_0.8.8-1_all.deb, and installing MySQL from Oracle repo:



    sudo dpkg -i mysql-apt-config_0.8.8-1_all.deb
    sudo apt update
    sudo apt install mysql-server





    share|improve this answer




















    • 2





      isntall -> install typo. Stupid SO does not allow me to correct one character.

      – Csaba Toth
      Jul 11 '18 at 16:54


















    0














    I had the same issue. I tried to re-install mysql several times, but had no success.



    I figured out that the problem for me was, that another mysql process was already running.



    In details:



    After I read carefully logs in /var/log/mysql/error.log, and found:




    [ERROR] Can't start server: Bind on TCP/IP port: Address already in
    use



    [ERROR] Do you already have another mysqld server running on port:
    3306 ?




    Looks like another application was using already the port.



    I checked it using ps -aux | grep 3306:



    $ ps -aux | grep 3306
    milkovs+ 6802 0.0 0.0 16336 1084 pts/19 S+ 21:39 0:00 grep --color=auto 3306
    mysql 14706 0.0 0.3 1270192 13916 pts/2 Sl Aug19 0:29 /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=


    And I killed the running process sudo kill -15 14706



    Then I started mysql: /etc/init.d/mysql start



    Finally mysql works for me! I hope it helps somebody.






    share|improve this answer






























      0














      I have had the issue on a few servers now
      The fix was to run
      apt install phpmyadmin --reinstall



      which resolved the above (with no need to touch mysql afterwards)






      share|improve this answer





















        protected by Community Apr 29 '16 at 15:41



        Thank you for your interest in this question.
        Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



        Would you like to answer one of these unanswered questions instead?














        9 Answers
        9






        active

        oldest

        votes








        9 Answers
        9






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        116














        The instructions @andrew-beerman posted are on the right track, though they aren't quite clear to me and seem to recommend more than is necessary. I pieced together the answer from the above and a helpful post in the bug thread.



        These are the steps I took to correct this:




        1. Back up your my.cnf file in /etc/mysql and remove or rename it



          sudo mv /etc/mysql/my.cnf /etc/mysql/my.cnf.bak



        2. Remove the folder /etc/mysql/mysql.conf.d/ using



          sudo rm -r /etc/mysql/mysql.conf.d/



        3. Verify you don't have a my.cnf file stashed somewhere else (I did in my home dir!) or in /etc/alternatives/my.cnf use



          sudo find / -name my.cnf



        4. Backup and remove /etc/mysql/debian.cnf files (not sure if needed, but just in case)



          sudo mv /etc/mysql/debian.cnf /etc/mysql/debian.cnf.bak
          sudo apt purge mysql-server mysql-server-5.7 mysql-server-core-5.7
          sudo apt install mysql-server



        5. In case your syslog shows an error like "mysqld: Can't read dir of '/etc/mysql/conf.d/'" create a symbolic link:



          sudo ln -s /etc/mysql/mysql.conf.d /etc/mysql/conf.d


          Then the service should be able to start with sudo service mysql start.



        That got it working!






        share|improve this answer




















        • 16





          after all these operations (I did it before) I still have same error issues...

          – Sergii P
          Apr 29 '16 at 14:05






        • 5





          You have to remove every my.cnf.* from the /etc/mysql directory. Look for my.cnf.backup, my.cnf.fallback and my.cnf.migrated - all of these files have to be removed too (backup first!)

          – hitzi
          May 3 '16 at 8:51






        • 8





          @SergiiP sudo find / -name "my.cnf" might come in handy.

          – starbeamrainbowlabs
          May 14 '16 at 11:31






        • 1





          mysql-server-core- should be mysql-server-core-5.7. Otherwise worked like a charm. Thank you!

          – David Tay
          May 20 '16 at 12:56






        • 1





          +1. You've made my day! Also morning and evening! I was stuck.

          – Max Yudin
          Jun 7 '16 at 17:44















        116














        The instructions @andrew-beerman posted are on the right track, though they aren't quite clear to me and seem to recommend more than is necessary. I pieced together the answer from the above and a helpful post in the bug thread.



        These are the steps I took to correct this:




        1. Back up your my.cnf file in /etc/mysql and remove or rename it



          sudo mv /etc/mysql/my.cnf /etc/mysql/my.cnf.bak



        2. Remove the folder /etc/mysql/mysql.conf.d/ using



          sudo rm -r /etc/mysql/mysql.conf.d/



        3. Verify you don't have a my.cnf file stashed somewhere else (I did in my home dir!) or in /etc/alternatives/my.cnf use



          sudo find / -name my.cnf



        4. Backup and remove /etc/mysql/debian.cnf files (not sure if needed, but just in case)



          sudo mv /etc/mysql/debian.cnf /etc/mysql/debian.cnf.bak
          sudo apt purge mysql-server mysql-server-5.7 mysql-server-core-5.7
          sudo apt install mysql-server



        5. In case your syslog shows an error like "mysqld: Can't read dir of '/etc/mysql/conf.d/'" create a symbolic link:



          sudo ln -s /etc/mysql/mysql.conf.d /etc/mysql/conf.d


          Then the service should be able to start with sudo service mysql start.



        That got it working!






        share|improve this answer




















        • 16





          after all these operations (I did it before) I still have same error issues...

          – Sergii P
          Apr 29 '16 at 14:05






        • 5





          You have to remove every my.cnf.* from the /etc/mysql directory. Look for my.cnf.backup, my.cnf.fallback and my.cnf.migrated - all of these files have to be removed too (backup first!)

          – hitzi
          May 3 '16 at 8:51






        • 8





          @SergiiP sudo find / -name "my.cnf" might come in handy.

          – starbeamrainbowlabs
          May 14 '16 at 11:31






        • 1





          mysql-server-core- should be mysql-server-core-5.7. Otherwise worked like a charm. Thank you!

          – David Tay
          May 20 '16 at 12:56






        • 1





          +1. You've made my day! Also morning and evening! I was stuck.

          – Max Yudin
          Jun 7 '16 at 17:44













        116












        116








        116







        The instructions @andrew-beerman posted are on the right track, though they aren't quite clear to me and seem to recommend more than is necessary. I pieced together the answer from the above and a helpful post in the bug thread.



        These are the steps I took to correct this:




        1. Back up your my.cnf file in /etc/mysql and remove or rename it



          sudo mv /etc/mysql/my.cnf /etc/mysql/my.cnf.bak



        2. Remove the folder /etc/mysql/mysql.conf.d/ using



          sudo rm -r /etc/mysql/mysql.conf.d/



        3. Verify you don't have a my.cnf file stashed somewhere else (I did in my home dir!) or in /etc/alternatives/my.cnf use



          sudo find / -name my.cnf



        4. Backup and remove /etc/mysql/debian.cnf files (not sure if needed, but just in case)



          sudo mv /etc/mysql/debian.cnf /etc/mysql/debian.cnf.bak
          sudo apt purge mysql-server mysql-server-5.7 mysql-server-core-5.7
          sudo apt install mysql-server



        5. In case your syslog shows an error like "mysqld: Can't read dir of '/etc/mysql/conf.d/'" create a symbolic link:



          sudo ln -s /etc/mysql/mysql.conf.d /etc/mysql/conf.d


          Then the service should be able to start with sudo service mysql start.



        That got it working!






        share|improve this answer















        The instructions @andrew-beerman posted are on the right track, though they aren't quite clear to me and seem to recommend more than is necessary. I pieced together the answer from the above and a helpful post in the bug thread.



        These are the steps I took to correct this:




        1. Back up your my.cnf file in /etc/mysql and remove or rename it



          sudo mv /etc/mysql/my.cnf /etc/mysql/my.cnf.bak



        2. Remove the folder /etc/mysql/mysql.conf.d/ using



          sudo rm -r /etc/mysql/mysql.conf.d/



        3. Verify you don't have a my.cnf file stashed somewhere else (I did in my home dir!) or in /etc/alternatives/my.cnf use



          sudo find / -name my.cnf



        4. Backup and remove /etc/mysql/debian.cnf files (not sure if needed, but just in case)



          sudo mv /etc/mysql/debian.cnf /etc/mysql/debian.cnf.bak
          sudo apt purge mysql-server mysql-server-5.7 mysql-server-core-5.7
          sudo apt install mysql-server



        5. In case your syslog shows an error like "mysqld: Can't read dir of '/etc/mysql/conf.d/'" create a symbolic link:



          sudo ln -s /etc/mysql/mysql.conf.d /etc/mysql/conf.d


          Then the service should be able to start with sudo service mysql start.



        That got it working!







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jul 6 '17 at 6:11









        muru

        1




        1










        answered Apr 25 '16 at 13:38









        TheGremlynTheGremlyn

        1,91931015




        1,91931015







        • 16





          after all these operations (I did it before) I still have same error issues...

          – Sergii P
          Apr 29 '16 at 14:05






        • 5





          You have to remove every my.cnf.* from the /etc/mysql directory. Look for my.cnf.backup, my.cnf.fallback and my.cnf.migrated - all of these files have to be removed too (backup first!)

          – hitzi
          May 3 '16 at 8:51






        • 8





          @SergiiP sudo find / -name "my.cnf" might come in handy.

          – starbeamrainbowlabs
          May 14 '16 at 11:31






        • 1





          mysql-server-core- should be mysql-server-core-5.7. Otherwise worked like a charm. Thank you!

          – David Tay
          May 20 '16 at 12:56






        • 1





          +1. You've made my day! Also morning and evening! I was stuck.

          – Max Yudin
          Jun 7 '16 at 17:44












        • 16





          after all these operations (I did it before) I still have same error issues...

          – Sergii P
          Apr 29 '16 at 14:05






        • 5





          You have to remove every my.cnf.* from the /etc/mysql directory. Look for my.cnf.backup, my.cnf.fallback and my.cnf.migrated - all of these files have to be removed too (backup first!)

          – hitzi
          May 3 '16 at 8:51






        • 8





          @SergiiP sudo find / -name "my.cnf" might come in handy.

          – starbeamrainbowlabs
          May 14 '16 at 11:31






        • 1





          mysql-server-core- should be mysql-server-core-5.7. Otherwise worked like a charm. Thank you!

          – David Tay
          May 20 '16 at 12:56






        • 1





          +1. You've made my day! Also morning and evening! I was stuck.

          – Max Yudin
          Jun 7 '16 at 17:44







        16




        16





        after all these operations (I did it before) I still have same error issues...

        – Sergii P
        Apr 29 '16 at 14:05





        after all these operations (I did it before) I still have same error issues...

        – Sergii P
        Apr 29 '16 at 14:05




        5




        5





        You have to remove every my.cnf.* from the /etc/mysql directory. Look for my.cnf.backup, my.cnf.fallback and my.cnf.migrated - all of these files have to be removed too (backup first!)

        – hitzi
        May 3 '16 at 8:51





        You have to remove every my.cnf.* from the /etc/mysql directory. Look for my.cnf.backup, my.cnf.fallback and my.cnf.migrated - all of these files have to be removed too (backup first!)

        – hitzi
        May 3 '16 at 8:51




        8




        8





        @SergiiP sudo find / -name "my.cnf" might come in handy.

        – starbeamrainbowlabs
        May 14 '16 at 11:31





        @SergiiP sudo find / -name "my.cnf" might come in handy.

        – starbeamrainbowlabs
        May 14 '16 at 11:31




        1




        1





        mysql-server-core- should be mysql-server-core-5.7. Otherwise worked like a charm. Thank you!

        – David Tay
        May 20 '16 at 12:56





        mysql-server-core- should be mysql-server-core-5.7. Otherwise worked like a charm. Thank you!

        – David Tay
        May 20 '16 at 12:56




        1




        1





        +1. You've made my day! Also morning and evening! I was stuck.

        – Max Yudin
        Jun 7 '16 at 17:44





        +1. You've made my day! Also morning and evening! I was stuck.

        – Max Yudin
        Jun 7 '16 at 17:44













        55














        Today I got the same problem, after trying many solutions i found that the problem was the command sudo systemctl disable mysql.service that i used to disable MySQL auto starting, so to get it working i re-enabled again MySQL server using the command sudo systemctl enable mysql.service and run again the upgrade process and it terminated perfectly.






        share|improve this answer


















        • 5





          I ran in to this same problem and the same fix worked for me.

          – Allen
          Apr 26 '16 at 15:13






        • 5





          Worked for me. Did every solution here, mysql worked after this one.

          – Błażej Michalik
          Apr 29 '16 at 14:51






        • 5





          Same here - this should be top post.

          – a1phanumeric
          Sep 15 '16 at 14:32






        • 2





          Worked for me too! Thank you so much. Just to be explicit, run: sudo systemctl enable mysql.service and after that run sudo apt install -f.

          – Fernando Paladini
          Jan 25 '17 at 0:03












        • This is all I had to do. I had disabled autostart like described by @naruto. I enabled autostart and run "sudo apt upgrade". Now fixed. Should be top answer. This is a much simpler, more standard and less trouble prone solution.

          – Jack Holt
          Aug 7 '17 at 16:00
















        55














        Today I got the same problem, after trying many solutions i found that the problem was the command sudo systemctl disable mysql.service that i used to disable MySQL auto starting, so to get it working i re-enabled again MySQL server using the command sudo systemctl enable mysql.service and run again the upgrade process and it terminated perfectly.






        share|improve this answer


















        • 5





          I ran in to this same problem and the same fix worked for me.

          – Allen
          Apr 26 '16 at 15:13






        • 5





          Worked for me. Did every solution here, mysql worked after this one.

          – Błażej Michalik
          Apr 29 '16 at 14:51






        • 5





          Same here - this should be top post.

          – a1phanumeric
          Sep 15 '16 at 14:32






        • 2





          Worked for me too! Thank you so much. Just to be explicit, run: sudo systemctl enable mysql.service and after that run sudo apt install -f.

          – Fernando Paladini
          Jan 25 '17 at 0:03












        • This is all I had to do. I had disabled autostart like described by @naruto. I enabled autostart and run "sudo apt upgrade". Now fixed. Should be top answer. This is a much simpler, more standard and less trouble prone solution.

          – Jack Holt
          Aug 7 '17 at 16:00














        55












        55








        55







        Today I got the same problem, after trying many solutions i found that the problem was the command sudo systemctl disable mysql.service that i used to disable MySQL auto starting, so to get it working i re-enabled again MySQL server using the command sudo systemctl enable mysql.service and run again the upgrade process and it terminated perfectly.






        share|improve this answer













        Today I got the same problem, after trying many solutions i found that the problem was the command sudo systemctl disable mysql.service that i used to disable MySQL auto starting, so to get it working i re-enabled again MySQL server using the command sudo systemctl enable mysql.service and run again the upgrade process and it terminated perfectly.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 25 '16 at 22:37









        Naruto Biju ModeNaruto Biju Mode

        65132




        65132







        • 5





          I ran in to this same problem and the same fix worked for me.

          – Allen
          Apr 26 '16 at 15:13






        • 5





          Worked for me. Did every solution here, mysql worked after this one.

          – Błażej Michalik
          Apr 29 '16 at 14:51






        • 5





          Same here - this should be top post.

          – a1phanumeric
          Sep 15 '16 at 14:32






        • 2





          Worked for me too! Thank you so much. Just to be explicit, run: sudo systemctl enable mysql.service and after that run sudo apt install -f.

          – Fernando Paladini
          Jan 25 '17 at 0:03












        • This is all I had to do. I had disabled autostart like described by @naruto. I enabled autostart and run "sudo apt upgrade". Now fixed. Should be top answer. This is a much simpler, more standard and less trouble prone solution.

          – Jack Holt
          Aug 7 '17 at 16:00













        • 5





          I ran in to this same problem and the same fix worked for me.

          – Allen
          Apr 26 '16 at 15:13






        • 5





          Worked for me. Did every solution here, mysql worked after this one.

          – Błażej Michalik
          Apr 29 '16 at 14:51






        • 5





          Same here - this should be top post.

          – a1phanumeric
          Sep 15 '16 at 14:32






        • 2





          Worked for me too! Thank you so much. Just to be explicit, run: sudo systemctl enable mysql.service and after that run sudo apt install -f.

          – Fernando Paladini
          Jan 25 '17 at 0:03












        • This is all I had to do. I had disabled autostart like described by @naruto. I enabled autostart and run "sudo apt upgrade". Now fixed. Should be top answer. This is a much simpler, more standard and less trouble prone solution.

          – Jack Holt
          Aug 7 '17 at 16:00








        5




        5





        I ran in to this same problem and the same fix worked for me.

        – Allen
        Apr 26 '16 at 15:13





        I ran in to this same problem and the same fix worked for me.

        – Allen
        Apr 26 '16 at 15:13




        5




        5





        Worked for me. Did every solution here, mysql worked after this one.

        – Błażej Michalik
        Apr 29 '16 at 14:51





        Worked for me. Did every solution here, mysql worked after this one.

        – Błażej Michalik
        Apr 29 '16 at 14:51




        5




        5





        Same here - this should be top post.

        – a1phanumeric
        Sep 15 '16 at 14:32





        Same here - this should be top post.

        – a1phanumeric
        Sep 15 '16 at 14:32




        2




        2





        Worked for me too! Thank you so much. Just to be explicit, run: sudo systemctl enable mysql.service and after that run sudo apt install -f.

        – Fernando Paladini
        Jan 25 '17 at 0:03






        Worked for me too! Thank you so much. Just to be explicit, run: sudo systemctl enable mysql.service and after that run sudo apt install -f.

        – Fernando Paladini
        Jan 25 '17 at 0:03














        This is all I had to do. I had disabled autostart like described by @naruto. I enabled autostart and run "sudo apt upgrade". Now fixed. Should be top answer. This is a much simpler, more standard and less trouble prone solution.

        – Jack Holt
        Aug 7 '17 at 16:00






        This is all I had to do. I had disabled autostart like described by @naruto. I enabled autostart and run "sudo apt upgrade". Now fixed. Should be top answer. This is a much simpler, more standard and less trouble prone solution.

        – Jack Holt
        Aug 7 '17 at 16:00












        19














        Your error message contains this line:



        subprocess installed post-installation script returned error exit status 1


        However, this installed post-installation script is not mentioned by name. After much tinkering, I found out that its name is (in my case) /var/lib/dpkg/info/mysql-server-5.7.postinst.



        Open this file with sudo vi /var/lib/dpkg/info/mysql-server-5.7.postinst, or your preferred editor.



        At the top, change line 3 (or so): set -e to set -x, save the file. (option -e is "exit on errors", -x means "explicitly show command executed", presumably)



        Run sudo dpkg --configure -a --log /tmp/dpkg.log
        (the --log option is optional). You can also simply run apt upgrade if you know it'll be the only package that will be upgraded.



        Now you get verbose output of the mysql-server-5.7.postinst bash script, and you can figure out what's wrong.



        In my case it unsuccessfully tried to (re-)run mysql_upgrade, but that was not needed for my customized mysql installation. I was sure I've run it manually before, successfully, and all was well.



        So I commmented out line 321 (for older mysqld releases try line 281),



        #mysql_upgrade --defaults-file=/etc/mysql/debian.cnf || result=$?



        and the command that has failed before, sudo apt upgrade (run it again), finished successfully, and dpkg removed the error status for this package.



        Now you can set back the set -x to set -e (mentioned above). And optionally uncomment the mysql-upgrade line.



        Extra work might be required if you have moved your mysql data partition to a nonstandard location. I moved mine from /var/lib/mysql/data to a different drive via symlink. Then you might have to remove the symbolic link temporarily, before the postinst script manipulation. Then re-create it after running the package upgrade.



        After the next minor version upgrade of the mysqld debian package, this problem with the /var/lib/dpkg/info/mysql-server-5.7.postinst script can show up again.






        share|improve this answer

























        • I ended up purging everything and then downloading the community mysql-server version and manually installing from here: dev.mysql.com/downloads/mysql

          – RyanNerd
          Sep 1 '16 at 19:34











        • Exactly the same thing happened to me, and your steps solved it to. Bur for me my mysql_upgrade call was on line 320. Can you explain why it return a non-zero value when called from postinst script?

          – emiliopedrollo
          Sep 24 '16 at 18:28












        • @emiliopedrollo No I can't explain here. But I think the line number is now 320 because recently the package maintainers have augmented the postinstall script, I have observed the same thing the other day, during the last run of the software-updater (which included a new mysql-deb-package).

          – knb
          Sep 24 '16 at 19:25












        • Thanks! With set -e I was able to work out the exact problem - MySQL didn't have access for the ubuntu system user specified in /etc/mysql/debian.cnf . So I added this user to MySQL and granted privileges, ran dpkg again and it worked!

          – Allen Hamilton
          Apr 24 '17 at 5:17
















        19














        Your error message contains this line:



        subprocess installed post-installation script returned error exit status 1


        However, this installed post-installation script is not mentioned by name. After much tinkering, I found out that its name is (in my case) /var/lib/dpkg/info/mysql-server-5.7.postinst.



        Open this file with sudo vi /var/lib/dpkg/info/mysql-server-5.7.postinst, or your preferred editor.



        At the top, change line 3 (or so): set -e to set -x, save the file. (option -e is "exit on errors", -x means "explicitly show command executed", presumably)



        Run sudo dpkg --configure -a --log /tmp/dpkg.log
        (the --log option is optional). You can also simply run apt upgrade if you know it'll be the only package that will be upgraded.



        Now you get verbose output of the mysql-server-5.7.postinst bash script, and you can figure out what's wrong.



        In my case it unsuccessfully tried to (re-)run mysql_upgrade, but that was not needed for my customized mysql installation. I was sure I've run it manually before, successfully, and all was well.



        So I commmented out line 321 (for older mysqld releases try line 281),



        #mysql_upgrade --defaults-file=/etc/mysql/debian.cnf || result=$?



        and the command that has failed before, sudo apt upgrade (run it again), finished successfully, and dpkg removed the error status for this package.



        Now you can set back the set -x to set -e (mentioned above). And optionally uncomment the mysql-upgrade line.



        Extra work might be required if you have moved your mysql data partition to a nonstandard location. I moved mine from /var/lib/mysql/data to a different drive via symlink. Then you might have to remove the symbolic link temporarily, before the postinst script manipulation. Then re-create it after running the package upgrade.



        After the next minor version upgrade of the mysqld debian package, this problem with the /var/lib/dpkg/info/mysql-server-5.7.postinst script can show up again.






        share|improve this answer

























        • I ended up purging everything and then downloading the community mysql-server version and manually installing from here: dev.mysql.com/downloads/mysql

          – RyanNerd
          Sep 1 '16 at 19:34











        • Exactly the same thing happened to me, and your steps solved it to. Bur for me my mysql_upgrade call was on line 320. Can you explain why it return a non-zero value when called from postinst script?

          – emiliopedrollo
          Sep 24 '16 at 18:28












        • @emiliopedrollo No I can't explain here. But I think the line number is now 320 because recently the package maintainers have augmented the postinstall script, I have observed the same thing the other day, during the last run of the software-updater (which included a new mysql-deb-package).

          – knb
          Sep 24 '16 at 19:25












        • Thanks! With set -e I was able to work out the exact problem - MySQL didn't have access for the ubuntu system user specified in /etc/mysql/debian.cnf . So I added this user to MySQL and granted privileges, ran dpkg again and it worked!

          – Allen Hamilton
          Apr 24 '17 at 5:17














        19












        19








        19







        Your error message contains this line:



        subprocess installed post-installation script returned error exit status 1


        However, this installed post-installation script is not mentioned by name. After much tinkering, I found out that its name is (in my case) /var/lib/dpkg/info/mysql-server-5.7.postinst.



        Open this file with sudo vi /var/lib/dpkg/info/mysql-server-5.7.postinst, or your preferred editor.



        At the top, change line 3 (or so): set -e to set -x, save the file. (option -e is "exit on errors", -x means "explicitly show command executed", presumably)



        Run sudo dpkg --configure -a --log /tmp/dpkg.log
        (the --log option is optional). You can also simply run apt upgrade if you know it'll be the only package that will be upgraded.



        Now you get verbose output of the mysql-server-5.7.postinst bash script, and you can figure out what's wrong.



        In my case it unsuccessfully tried to (re-)run mysql_upgrade, but that was not needed for my customized mysql installation. I was sure I've run it manually before, successfully, and all was well.



        So I commmented out line 321 (for older mysqld releases try line 281),



        #mysql_upgrade --defaults-file=/etc/mysql/debian.cnf || result=$?



        and the command that has failed before, sudo apt upgrade (run it again), finished successfully, and dpkg removed the error status for this package.



        Now you can set back the set -x to set -e (mentioned above). And optionally uncomment the mysql-upgrade line.



        Extra work might be required if you have moved your mysql data partition to a nonstandard location. I moved mine from /var/lib/mysql/data to a different drive via symlink. Then you might have to remove the symbolic link temporarily, before the postinst script manipulation. Then re-create it after running the package upgrade.



        After the next minor version upgrade of the mysqld debian package, this problem with the /var/lib/dpkg/info/mysql-server-5.7.postinst script can show up again.






        share|improve this answer















        Your error message contains this line:



        subprocess installed post-installation script returned error exit status 1


        However, this installed post-installation script is not mentioned by name. After much tinkering, I found out that its name is (in my case) /var/lib/dpkg/info/mysql-server-5.7.postinst.



        Open this file with sudo vi /var/lib/dpkg/info/mysql-server-5.7.postinst, or your preferred editor.



        At the top, change line 3 (or so): set -e to set -x, save the file. (option -e is "exit on errors", -x means "explicitly show command executed", presumably)



        Run sudo dpkg --configure -a --log /tmp/dpkg.log
        (the --log option is optional). You can also simply run apt upgrade if you know it'll be the only package that will be upgraded.



        Now you get verbose output of the mysql-server-5.7.postinst bash script, and you can figure out what's wrong.



        In my case it unsuccessfully tried to (re-)run mysql_upgrade, but that was not needed for my customized mysql installation. I was sure I've run it manually before, successfully, and all was well.



        So I commmented out line 321 (for older mysqld releases try line 281),



        #mysql_upgrade --defaults-file=/etc/mysql/debian.cnf || result=$?



        and the command that has failed before, sudo apt upgrade (run it again), finished successfully, and dpkg removed the error status for this package.



        Now you can set back the set -x to set -e (mentioned above). And optionally uncomment the mysql-upgrade line.



        Extra work might be required if you have moved your mysql data partition to a nonstandard location. I moved mine from /var/lib/mysql/data to a different drive via symlink. Then you might have to remove the symbolic link temporarily, before the postinst script manipulation. Then re-create it after running the package upgrade.



        After the next minor version upgrade of the mysqld debian package, this problem with the /var/lib/dpkg/info/mysql-server-5.7.postinst script can show up again.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jan 23 '18 at 8:10

























        answered Jul 1 '16 at 12:03









        knbknb

        1,99922131




        1,99922131












        • I ended up purging everything and then downloading the community mysql-server version and manually installing from here: dev.mysql.com/downloads/mysql

          – RyanNerd
          Sep 1 '16 at 19:34











        • Exactly the same thing happened to me, and your steps solved it to. Bur for me my mysql_upgrade call was on line 320. Can you explain why it return a non-zero value when called from postinst script?

          – emiliopedrollo
          Sep 24 '16 at 18:28












        • @emiliopedrollo No I can't explain here. But I think the line number is now 320 because recently the package maintainers have augmented the postinstall script, I have observed the same thing the other day, during the last run of the software-updater (which included a new mysql-deb-package).

          – knb
          Sep 24 '16 at 19:25












        • Thanks! With set -e I was able to work out the exact problem - MySQL didn't have access for the ubuntu system user specified in /etc/mysql/debian.cnf . So I added this user to MySQL and granted privileges, ran dpkg again and it worked!

          – Allen Hamilton
          Apr 24 '17 at 5:17


















        • I ended up purging everything and then downloading the community mysql-server version and manually installing from here: dev.mysql.com/downloads/mysql

          – RyanNerd
          Sep 1 '16 at 19:34











        • Exactly the same thing happened to me, and your steps solved it to. Bur for me my mysql_upgrade call was on line 320. Can you explain why it return a non-zero value when called from postinst script?

          – emiliopedrollo
          Sep 24 '16 at 18:28












        • @emiliopedrollo No I can't explain here. But I think the line number is now 320 because recently the package maintainers have augmented the postinstall script, I have observed the same thing the other day, during the last run of the software-updater (which included a new mysql-deb-package).

          – knb
          Sep 24 '16 at 19:25












        • Thanks! With set -e I was able to work out the exact problem - MySQL didn't have access for the ubuntu system user specified in /etc/mysql/debian.cnf . So I added this user to MySQL and granted privileges, ran dpkg again and it worked!

          – Allen Hamilton
          Apr 24 '17 at 5:17

















        I ended up purging everything and then downloading the community mysql-server version and manually installing from here: dev.mysql.com/downloads/mysql

        – RyanNerd
        Sep 1 '16 at 19:34





        I ended up purging everything and then downloading the community mysql-server version and manually installing from here: dev.mysql.com/downloads/mysql

        – RyanNerd
        Sep 1 '16 at 19:34













        Exactly the same thing happened to me, and your steps solved it to. Bur for me my mysql_upgrade call was on line 320. Can you explain why it return a non-zero value when called from postinst script?

        – emiliopedrollo
        Sep 24 '16 at 18:28






        Exactly the same thing happened to me, and your steps solved it to. Bur for me my mysql_upgrade call was on line 320. Can you explain why it return a non-zero value when called from postinst script?

        – emiliopedrollo
        Sep 24 '16 at 18:28














        @emiliopedrollo No I can't explain here. But I think the line number is now 320 because recently the package maintainers have augmented the postinstall script, I have observed the same thing the other day, during the last run of the software-updater (which included a new mysql-deb-package).

        – knb
        Sep 24 '16 at 19:25






        @emiliopedrollo No I can't explain here. But I think the line number is now 320 because recently the package maintainers have augmented the postinstall script, I have observed the same thing the other day, during the last run of the software-updater (which included a new mysql-deb-package).

        – knb
        Sep 24 '16 at 19:25














        Thanks! With set -e I was able to work out the exact problem - MySQL didn't have access for the ubuntu system user specified in /etc/mysql/debian.cnf . So I added this user to MySQL and granted privileges, ran dpkg again and it worked!

        – Allen Hamilton
        Apr 24 '17 at 5:17






        Thanks! With set -e I was able to work out the exact problem - MySQL didn't have access for the ubuntu system user specified in /etc/mysql/debian.cnf . So I added this user to MySQL and granted privileges, ran dpkg again and it worked!

        – Allen Hamilton
        Apr 24 '17 at 5:17












        17














        The instructions here fixed it on my server: https://bugs.mysql.com/bug.php?id=72722




        I can understand the pain of having your system in inconsistent state
        but lets not worry about the whole situation and take it step by step
        to get the system clean.



        First lets see the current state of all the mysql packages on machine
        using: dpkg -l | grep mysql (Please paste the output excluding last
        column)



        The first column denotes the current status of the package. Here are
        the possible options:



        ii) Installed rc) Removed config-files kept (This should be the state
        of all the packages you have removed with 'apt-get remove' that does
        not remove config-files under /etc)



        For this to work, you will need to run 'apt-get purge ' till
        you do not see any packages in the above list.



        Please remember that some non-mysql-server packages like
        python-mysql.connector and python-mysqldb, if installed, need not be
        removed as they do not have any affect on this situation but if
        removed might cause trouble to applications using them.



        We will definitely try to re-visit our docs to see how can we
        safeguard users from getting into this trouble. Thanks for sharing
        your feedback in detail with us.







        share|improve this answer


















        • 2





          Thanks for dpkg -l | grep mysql . It helped to understand the direction.

          – Max Yudin
          Jun 7 '16 at 17:47















        17














        The instructions here fixed it on my server: https://bugs.mysql.com/bug.php?id=72722




        I can understand the pain of having your system in inconsistent state
        but lets not worry about the whole situation and take it step by step
        to get the system clean.



        First lets see the current state of all the mysql packages on machine
        using: dpkg -l | grep mysql (Please paste the output excluding last
        column)



        The first column denotes the current status of the package. Here are
        the possible options:



        ii) Installed rc) Removed config-files kept (This should be the state
        of all the packages you have removed with 'apt-get remove' that does
        not remove config-files under /etc)



        For this to work, you will need to run 'apt-get purge ' till
        you do not see any packages in the above list.



        Please remember that some non-mysql-server packages like
        python-mysql.connector and python-mysqldb, if installed, need not be
        removed as they do not have any affect on this situation but if
        removed might cause trouble to applications using them.



        We will definitely try to re-visit our docs to see how can we
        safeguard users from getting into this trouble. Thanks for sharing
        your feedback in detail with us.







        share|improve this answer


















        • 2





          Thanks for dpkg -l | grep mysql . It helped to understand the direction.

          – Max Yudin
          Jun 7 '16 at 17:47













        17












        17








        17







        The instructions here fixed it on my server: https://bugs.mysql.com/bug.php?id=72722




        I can understand the pain of having your system in inconsistent state
        but lets not worry about the whole situation and take it step by step
        to get the system clean.



        First lets see the current state of all the mysql packages on machine
        using: dpkg -l | grep mysql (Please paste the output excluding last
        column)



        The first column denotes the current status of the package. Here are
        the possible options:



        ii) Installed rc) Removed config-files kept (This should be the state
        of all the packages you have removed with 'apt-get remove' that does
        not remove config-files under /etc)



        For this to work, you will need to run 'apt-get purge ' till
        you do not see any packages in the above list.



        Please remember that some non-mysql-server packages like
        python-mysql.connector and python-mysqldb, if installed, need not be
        removed as they do not have any affect on this situation but if
        removed might cause trouble to applications using them.



        We will definitely try to re-visit our docs to see how can we
        safeguard users from getting into this trouble. Thanks for sharing
        your feedback in detail with us.







        share|improve this answer













        The instructions here fixed it on my server: https://bugs.mysql.com/bug.php?id=72722




        I can understand the pain of having your system in inconsistent state
        but lets not worry about the whole situation and take it step by step
        to get the system clean.



        First lets see the current state of all the mysql packages on machine
        using: dpkg -l | grep mysql (Please paste the output excluding last
        column)



        The first column denotes the current status of the package. Here are
        the possible options:



        ii) Installed rc) Removed config-files kept (This should be the state
        of all the packages you have removed with 'apt-get remove' that does
        not remove config-files under /etc)



        For this to work, you will need to run 'apt-get purge ' till
        you do not see any packages in the above list.



        Please remember that some non-mysql-server packages like
        python-mysql.connector and python-mysqldb, if installed, need not be
        removed as they do not have any affect on this situation but if
        removed might cause trouble to applications using them.



        We will definitely try to re-visit our docs to see how can we
        safeguard users from getting into this trouble. Thanks for sharing
        your feedback in detail with us.








        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 22 '16 at 22:05









        Andrew BeemanAndrew Beeman

        1714




        1714







        • 2





          Thanks for dpkg -l | grep mysql . It helped to understand the direction.

          – Max Yudin
          Jun 7 '16 at 17:47












        • 2





          Thanks for dpkg -l | grep mysql . It helped to understand the direction.

          – Max Yudin
          Jun 7 '16 at 17:47







        2




        2





        Thanks for dpkg -l | grep mysql . It helped to understand the direction.

        – Max Yudin
        Jun 7 '16 at 17:47





        Thanks for dpkg -l | grep mysql . It helped to understand the direction.

        – Max Yudin
        Jun 7 '16 at 17:47











        3














        In my case, with strace, I saw that /var/run/mysqld/ didn't exist and mysqld can't create the file mysqld.sock.



        These commands solved my problem:



        mkdir /var/run/mysqld
        chown mysql.mysql /var/run/mysqld
        chmod 700 /var/run/mysqld


        Now:



        systemctl start mysql


        And mysql works again :)






        share|improve this answer























        • I suggest you add these lines to /usr/share/mysql/mysql-systemd-start starting at line 25, then you won't have to recreate this directory after every reboot (sorry the line returns don't work in this comment): if [ ! -d /run/msyqld ]; then mkdir -p -m0755 /run/mysqld || echo "Unable to create /run/mysqld"; exit 1; chown mysql:mysql /run/mysqld || echo "Unable to chown /run/mysqld"; exit 1; fi

          – scoobydoo
          Jun 30 '16 at 14:44
















        3














        In my case, with strace, I saw that /var/run/mysqld/ didn't exist and mysqld can't create the file mysqld.sock.



        These commands solved my problem:



        mkdir /var/run/mysqld
        chown mysql.mysql /var/run/mysqld
        chmod 700 /var/run/mysqld


        Now:



        systemctl start mysql


        And mysql works again :)






        share|improve this answer























        • I suggest you add these lines to /usr/share/mysql/mysql-systemd-start starting at line 25, then you won't have to recreate this directory after every reboot (sorry the line returns don't work in this comment): if [ ! -d /run/msyqld ]; then mkdir -p -m0755 /run/mysqld || echo "Unable to create /run/mysqld"; exit 1; chown mysql:mysql /run/mysqld || echo "Unable to chown /run/mysqld"; exit 1; fi

          – scoobydoo
          Jun 30 '16 at 14:44














        3












        3








        3







        In my case, with strace, I saw that /var/run/mysqld/ didn't exist and mysqld can't create the file mysqld.sock.



        These commands solved my problem:



        mkdir /var/run/mysqld
        chown mysql.mysql /var/run/mysqld
        chmod 700 /var/run/mysqld


        Now:



        systemctl start mysql


        And mysql works again :)






        share|improve this answer













        In my case, with strace, I saw that /var/run/mysqld/ didn't exist and mysqld can't create the file mysqld.sock.



        These commands solved my problem:



        mkdir /var/run/mysqld
        chown mysql.mysql /var/run/mysqld
        chmod 700 /var/run/mysqld


        Now:



        systemctl start mysql


        And mysql works again :)







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 27 '16 at 8:14









        Leonardo CatalinasLeonardo Catalinas

        311




        311












        • I suggest you add these lines to /usr/share/mysql/mysql-systemd-start starting at line 25, then you won't have to recreate this directory after every reboot (sorry the line returns don't work in this comment): if [ ! -d /run/msyqld ]; then mkdir -p -m0755 /run/mysqld || echo "Unable to create /run/mysqld"; exit 1; chown mysql:mysql /run/mysqld || echo "Unable to chown /run/mysqld"; exit 1; fi

          – scoobydoo
          Jun 30 '16 at 14:44


















        • I suggest you add these lines to /usr/share/mysql/mysql-systemd-start starting at line 25, then you won't have to recreate this directory after every reboot (sorry the line returns don't work in this comment): if [ ! -d /run/msyqld ]; then mkdir -p -m0755 /run/mysqld || echo "Unable to create /run/mysqld"; exit 1; chown mysql:mysql /run/mysqld || echo "Unable to chown /run/mysqld"; exit 1; fi

          – scoobydoo
          Jun 30 '16 at 14:44

















        I suggest you add these lines to /usr/share/mysql/mysql-systemd-start starting at line 25, then you won't have to recreate this directory after every reboot (sorry the line returns don't work in this comment): if [ ! -d /run/msyqld ]; then mkdir -p -m0755 /run/mysqld || echo "Unable to create /run/mysqld"; exit 1; chown mysql:mysql /run/mysqld || echo "Unable to chown /run/mysqld"; exit 1; fi

        – scoobydoo
        Jun 30 '16 at 14:44






        I suggest you add these lines to /usr/share/mysql/mysql-systemd-start starting at line 25, then you won't have to recreate this directory after every reboot (sorry the line returns don't work in this comment): if [ ! -d /run/msyqld ]; then mkdir -p -m0755 /run/mysqld || echo "Unable to create /run/mysqld"; exit 1; chown mysql:mysql /run/mysqld || echo "Unable to chown /run/mysqld"; exit 1; fi

        – scoobydoo
        Jun 30 '16 at 14:44












        3














        In my case I could solv the problem by adding



        # Allow log file access
        /home/system/var/log/mysql.err rw,
        /home/system/var/log/mysql.log rw,
        /home/system/var/log/mysql/ r,
        /home/system/var/log/mysql/** rw,


        to /etc/apparmor.d/local/usr.sbin.mysqld



        For more details take a look at my answer (by ChristophS) at stackoverflow.






        share|improve this answer





























          3














          In my case I could solv the problem by adding



          # Allow log file access
          /home/system/var/log/mysql.err rw,
          /home/system/var/log/mysql.log rw,
          /home/system/var/log/mysql/ r,
          /home/system/var/log/mysql/** rw,


          to /etc/apparmor.d/local/usr.sbin.mysqld



          For more details take a look at my answer (by ChristophS) at stackoverflow.






          share|improve this answer



























            3












            3








            3







            In my case I could solv the problem by adding



            # Allow log file access
            /home/system/var/log/mysql.err rw,
            /home/system/var/log/mysql.log rw,
            /home/system/var/log/mysql/ r,
            /home/system/var/log/mysql/** rw,


            to /etc/apparmor.d/local/usr.sbin.mysqld



            For more details take a look at my answer (by ChristophS) at stackoverflow.






            share|improve this answer















            In my case I could solv the problem by adding



            # Allow log file access
            /home/system/var/log/mysql.err rw,
            /home/system/var/log/mysql.log rw,
            /home/system/var/log/mysql/ r,
            /home/system/var/log/mysql/** rw,


            to /etc/apparmor.d/local/usr.sbin.mysqld



            For more details take a look at my answer (by ChristophS) at stackoverflow.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited May 23 '17 at 12:39









            Community

            1




            1










            answered Apr 29 '16 at 12:30









            ChristophSChristophS

            19015




            19015





















                1














                None of the answers on this page worked for me.



                I ended up going to the Oracle downloads page, downloading mysql-apt-config_0.8.8-1_all.deb, and installing MySQL from Oracle repo:



                sudo dpkg -i mysql-apt-config_0.8.8-1_all.deb
                sudo apt update
                sudo apt install mysql-server





                share|improve this answer




















                • 2





                  isntall -> install typo. Stupid SO does not allow me to correct one character.

                  – Csaba Toth
                  Jul 11 '18 at 16:54















                1














                None of the answers on this page worked for me.



                I ended up going to the Oracle downloads page, downloading mysql-apt-config_0.8.8-1_all.deb, and installing MySQL from Oracle repo:



                sudo dpkg -i mysql-apt-config_0.8.8-1_all.deb
                sudo apt update
                sudo apt install mysql-server





                share|improve this answer




















                • 2





                  isntall -> install typo. Stupid SO does not allow me to correct one character.

                  – Csaba Toth
                  Jul 11 '18 at 16:54













                1












                1








                1







                None of the answers on this page worked for me.



                I ended up going to the Oracle downloads page, downloading mysql-apt-config_0.8.8-1_all.deb, and installing MySQL from Oracle repo:



                sudo dpkg -i mysql-apt-config_0.8.8-1_all.deb
                sudo apt update
                sudo apt install mysql-server





                share|improve this answer















                None of the answers on this page worked for me.



                I ended up going to the Oracle downloads page, downloading mysql-apt-config_0.8.8-1_all.deb, and installing MySQL from Oracle repo:



                sudo dpkg -i mysql-apt-config_0.8.8-1_all.deb
                sudo apt update
                sudo apt install mysql-server






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jul 11 '18 at 18:10

























                answered Sep 25 '17 at 17:19









                ostrokachostrokach

                56639




                56639







                • 2





                  isntall -> install typo. Stupid SO does not allow me to correct one character.

                  – Csaba Toth
                  Jul 11 '18 at 16:54












                • 2





                  isntall -> install typo. Stupid SO does not allow me to correct one character.

                  – Csaba Toth
                  Jul 11 '18 at 16:54







                2




                2





                isntall -> install typo. Stupid SO does not allow me to correct one character.

                – Csaba Toth
                Jul 11 '18 at 16:54





                isntall -> install typo. Stupid SO does not allow me to correct one character.

                – Csaba Toth
                Jul 11 '18 at 16:54











                0














                I had the same issue. I tried to re-install mysql several times, but had no success.



                I figured out that the problem for me was, that another mysql process was already running.



                In details:



                After I read carefully logs in /var/log/mysql/error.log, and found:




                [ERROR] Can't start server: Bind on TCP/IP port: Address already in
                use



                [ERROR] Do you already have another mysqld server running on port:
                3306 ?




                Looks like another application was using already the port.



                I checked it using ps -aux | grep 3306:



                $ ps -aux | grep 3306
                milkovs+ 6802 0.0 0.0 16336 1084 pts/19 S+ 21:39 0:00 grep --color=auto 3306
                mysql 14706 0.0 0.3 1270192 13916 pts/2 Sl Aug19 0:29 /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=


                And I killed the running process sudo kill -15 14706



                Then I started mysql: /etc/init.d/mysql start



                Finally mysql works for me! I hope it helps somebody.






                share|improve this answer



























                  0














                  I had the same issue. I tried to re-install mysql several times, but had no success.



                  I figured out that the problem for me was, that another mysql process was already running.



                  In details:



                  After I read carefully logs in /var/log/mysql/error.log, and found:




                  [ERROR] Can't start server: Bind on TCP/IP port: Address already in
                  use



                  [ERROR] Do you already have another mysqld server running on port:
                  3306 ?




                  Looks like another application was using already the port.



                  I checked it using ps -aux | grep 3306:



                  $ ps -aux | grep 3306
                  milkovs+ 6802 0.0 0.0 16336 1084 pts/19 S+ 21:39 0:00 grep --color=auto 3306
                  mysql 14706 0.0 0.3 1270192 13916 pts/2 Sl Aug19 0:29 /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=


                  And I killed the running process sudo kill -15 14706



                  Then I started mysql: /etc/init.d/mysql start



                  Finally mysql works for me! I hope it helps somebody.






                  share|improve this answer

























                    0












                    0








                    0







                    I had the same issue. I tried to re-install mysql several times, but had no success.



                    I figured out that the problem for me was, that another mysql process was already running.



                    In details:



                    After I read carefully logs in /var/log/mysql/error.log, and found:




                    [ERROR] Can't start server: Bind on TCP/IP port: Address already in
                    use



                    [ERROR] Do you already have another mysqld server running on port:
                    3306 ?




                    Looks like another application was using already the port.



                    I checked it using ps -aux | grep 3306:



                    $ ps -aux | grep 3306
                    milkovs+ 6802 0.0 0.0 16336 1084 pts/19 S+ 21:39 0:00 grep --color=auto 3306
                    mysql 14706 0.0 0.3 1270192 13916 pts/2 Sl Aug19 0:29 /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=


                    And I killed the running process sudo kill -15 14706



                    Then I started mysql: /etc/init.d/mysql start



                    Finally mysql works for me! I hope it helps somebody.






                    share|improve this answer













                    I had the same issue. I tried to re-install mysql several times, but had no success.



                    I figured out that the problem for me was, that another mysql process was already running.



                    In details:



                    After I read carefully logs in /var/log/mysql/error.log, and found:




                    [ERROR] Can't start server: Bind on TCP/IP port: Address already in
                    use



                    [ERROR] Do you already have another mysqld server running on port:
                    3306 ?




                    Looks like another application was using already the port.



                    I checked it using ps -aux | grep 3306:



                    $ ps -aux | grep 3306
                    milkovs+ 6802 0.0 0.0 16336 1084 pts/19 S+ 21:39 0:00 grep --color=auto 3306
                    mysql 14706 0.0 0.3 1270192 13916 pts/2 Sl Aug19 0:29 /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=


                    And I killed the running process sudo kill -15 14706



                    Then I started mysql: /etc/init.d/mysql start



                    Finally mysql works for me! I hope it helps somebody.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Aug 20 '16 at 20:02









                    milkovskymilkovsky

                    155110




                    155110





















                        0














                        I have had the issue on a few servers now
                        The fix was to run
                        apt install phpmyadmin --reinstall



                        which resolved the above (with no need to touch mysql afterwards)






                        share|improve this answer



























                          0














                          I have had the issue on a few servers now
                          The fix was to run
                          apt install phpmyadmin --reinstall



                          which resolved the above (with no need to touch mysql afterwards)






                          share|improve this answer

























                            0












                            0








                            0







                            I have had the issue on a few servers now
                            The fix was to run
                            apt install phpmyadmin --reinstall



                            which resolved the above (with no need to touch mysql afterwards)






                            share|improve this answer













                            I have had the issue on a few servers now
                            The fix was to run
                            apt install phpmyadmin --reinstall



                            which resolved the above (with no need to touch mysql afterwards)







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered 2 days ago









                            AndyAndy

                            1112




                            1112















                                protected by Community Apr 29 '16 at 15:41



                                Thank you for your interest in this question.
                                Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                                Would you like to answer one of these unanswered questions instead?



                                Popular posts from this blog

                                Tamil (spriik) Luke uk diar | Nawigatjuun

                                Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

                                Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?