Failure when installing mysql-server package

Moderators: mdrjr, odroid

Re: Failure when installing mysql-server package

Unread postby Charles R » Mon Aug 22, 2016 12:28 am

I have followed the below to a "T" and I still get an error... any hints? I tried not using the minimal installation and it appears to have installed fine.

Tried again with minimal install and this time it worked... what was different I have no clue!

Renaming removed key_buffer and myisam-recover options (if present)
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
Errors were encountered while processing:
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)



redrocket wrote:Here's my workaround on this one.
1. Bad news: You have to start with a clean image. download it from wiki page. I did try to remove all mysql* packages, but with no luck. Always hit the errors in the first post. Still have no idea why...
2. do apt-get update && upgrade && dist-upgrade
3. There was a package which was kept linux-image-c2. So I installed it (sudo apt-get install linux-image-c2)
4. Reboot
5. Edit boot.ini /media/boot/boot.ini - and set mesortimer to 0 (setenv mesontimer "0")
5.1 You may add setenv nographics "1" - if you not going to need the graphic environment
6. Reboot
7. sudo apt-get install mysql-server :)

N.B. This worked for me! I cannot guarantee that it'll work for you too.
Charles R
 
Posts: 8
Joined: Sun Aug 21, 2016 11:31 pm
languages_spoken: english
ODROIDs: C2 | XU4

Re: Failure when installing mysql-server package

Unread postby bekirk » Fri Nov 11, 2016 1:06 pm

I am trying to install Zoneminder and it needs mysql. Anyway that I can force my ubuntu to install 5.6 or get past the errors?

Code: Select all
Setting up mysql-server-5.7 (5.7.16-0ubuntu0.16.04.1) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Renaming removed key_buffer and myisam-recover options (if present)
ERROR: Unable to start MySQL server:
mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)
mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
Please take a look at https://wiki.debian.org/Teams/MySQL/FAQ for tips on fixing common upgrade issues.
Once the problem is resolved, run apt-get --fix-broken install to retry.
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-4ubuntu12) ...
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 tried to tell my system to install 5.6 but it didn't seem to find that version. If anyone else is using odroid C2 / ubuntu and mysql-server-5.7 and got it running or even getting 5.6 working let me know how.

Thank you.
bekirk
 
Posts: 1
Joined: Fri Nov 11, 2016 12:59 pm
languages_spoken: english
ODROIDs: C2

Re: Failure when installing mysql-server package

Unread postby brad » Fri Nov 11, 2016 4:44 pm

bekirk wrote:If anyone else is using odroid C2 / ubuntu and mysql-server-5.7 and got it running or even getting 5.6 working let me know how.


There are detail in the posts above about using the arch timer instead of the meson timer which fixes the problem. You need to make the modifications to your boot.ini file to set "setenv mesontimer "0" before attempting to install mysql.
brad
 
Posts: 702
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Failure when installing mysql-server package

Unread postby entr » Fri Nov 11, 2016 4:47 pm

Did someone tried installing mariadb instead ?
entr
 
Posts: 15
Joined: Mon Feb 08, 2016 7:09 pm
languages_spoken: english
ODROIDs: C1+

Re: Failure when installing mysql-server package

Unread postby harry4516 » Sat Nov 26, 2016 6:03 am

redrocket wrote:Here's my workaround on this one.
1. Bad news: You have to start with a clean image. download it from wiki page. I did try to remove all mysql* packages, but with no luck. Always hit the errors in the first post. Still have no idea why...
2. do apt-get update && upgrade && dist-upgrade
3. There was a package which was kept linux-image-c2. So I installed it (sudo apt-get install linux-image-c2)
4. Reboot
5. Edit boot.ini /media/boot/boot.ini - and set mesortimer to 0 (setenv mesontimer "0")
5.1 You may add setenv nographics "1" - if you not going to need the graphic environment
6. Reboot
7. sudo apt-get install mysql-server :)

N.B. This worked for me! I cannot guarantee that it'll work for you too.


wonderful, thank you !!!

I did this with the image Oct/17 and it works !
(I did not do step 3)
harry4516
 
Posts: 38
Joined: Sun Jan 25, 2015 10:35 am
Location: Bavaria, Germany
languages_spoken: english, german
ODROIDs: C1, C2, U3, XU3, XU4Q, Raspi2B, Raspi2, Raspi3B, BananaPI, BananaPro, HiKey(-junk). Best of all: XU4Q !

Re: Failure when installing mysql-server package

Unread postby redrocket » Fri Dec 09, 2016 6:01 am

And another thing that i discover today after a power loss.
Now if do an update and the update replaces your edited boot.ini, and then you reboot the odroid there is a pretty good chance that the mysql wont start.
So just edit the boot.ini:
sudo pico /media/boot/boot.ini
and change the mesontimer to be 0
setenv mesontimer "0"
save (Ctrl+X -> Y -> Enter) and reboot (sudo reboot)
and you should be fine
redrocket
 
Posts: 23
Joined: Thu May 26, 2016 1:55 pm
Location: Sofia / Bulgaria
languages_spoken: english
ODROIDs: C2

Re: Failure when installing mysql-server package

Unread postby fragilefungi » Tue Jan 17, 2017 3:18 pm

I just got my C2 a couple days ago, and didn't find this forum post until after I had already tried installing mysql-server and it failed. I fixed the mesontimer in the boot.ini and it still does the same thing. Everyone above was saying to start with a clean image, so I ordered a blank sd card from amazon so I could flash a clean image onto my eCCM.

While waiting for my order to ship I figured out how to install mysql-server when there has been a previously failed install due to the mesontimer.

sudo apt-get purge mysql-server
sudo rm -rf /var/lib/dpkg/info/mysql*
sudo rm -rf /usr/share/mysql*
sudo rm -rf /etc/default/mysql*
sudo rm -rf /etc/init.d/mysql*

sudo su -
dpkg -l | grep '^rc' | awk '{print $2}' | xargs dpkg --purge


The last step deletes the old mysql database (remove all configuration data from every removed package)

After I did this step I could install successfully and run
sudo mysql_secure_installation
fragilefungi
 
Posts: 1
Joined: Tue Jan 17, 2017 2:44 pm
languages_spoken: english
ODROIDs: C2

Re: Failure when installing mysql-server package

Unread postby gmruiz » Tue Jul 25, 2017 6:25 pm

Thank you for the info!!. Works perfecly for me!!
Regards/Goyo.
gmruiz
 
Posts: 1
Joined: Mon Sep 12, 2016 4:42 am
languages_spoken: english, spanish
ODROIDs: C2

Re: Failure when installing mysql-server package

Unread postby ha100 » Sat Dec 23, 2017 11:21 pm

@fragilefungi thanks man! after 3 hours this worked. tried all sorts of dark magic. really appreciated
ha100
 
Posts: 1
Joined: Sat Nov 12, 2016 1:31 am
languages_spoken: english slovakian czech
ODROIDs: C2

Re: Failure when installing mysql-server package

Unread postby smitna » Sun Apr 29, 2018 3:12 am

I solved this problem with following steps, no need for a new (clean) installation and setting setenv mesontimer "0":

  1. edit /var/lib/dpkg/info/mysql-server-5.7.postinst and set exit 0 at the beginning
  2. /etc/init.d/mysql start or systemctl start mysql.service
  3. apt-get update && apt-get upgrade should now work without errors
  4. mysql_install_db (optional if mysql DB is missing)
  5. mysql_secure_installation (optional to set some default values)

It's possible that the error returns with the next mysql update, then [1] should help again.
smitna
 
Posts: 8
Joined: Mon Feb 03, 2014 2:45 am
Location: Germany
languages_spoken: english, german
ODROIDs: ODROID-X, ODROID-U3, ODROID-XU, 3x ODROID-C2

Re: Failure when installing mysql-server package

Unread postby mshallop » Tue Jun 05, 2018 8:58 am

Read the thread... decided to install mariadb 10.0.34...

1. added the boot.ini mod (mesontimer="0")
2. rebooted
3. apt install mariadb-server mariadb-client php-mysql (as root)
4. mysql_secure_installation
5. add-apt-repository ppa:ondrej/php
6. apt update
7. apt install php7.2-fpm

Everything went just fine.... like another posted stated: may need to re-apply the boot.ini mod when you install a new kernel but, yeah, it's working... :mrgreen:
mshallop
 
Posts: 3
Joined: Sun Dec 03, 2017 5:58 am
languages_spoken: english
ODROIDs: HC1

Re: Failure when installing mysql-server package

Unread postby finopat » Sun Sep 16, 2018 12:41 am

Postby redrocket » Sat May 28, 2016 3:49 am

Here's my workaround on this one.
1. Bad news: You have to start with a clean image. download it from wiki page. I did try to remove all mysql* packages, but with no luck. Always hit the errors in the first post. Still have no idea why...
2. do apt-get update && upgrade && dist-upgrade
3. There was a package which was kept linux-image-c2. So I installed it (sudo apt-get install linux-image-c2)
4. Reboot
5. Edit boot.ini /media/boot/boot.ini - and set mesortimer to 0 (setenv mesontimer "0")
5.1 You may add setenv nographics "1" - if you not going to need the graphic environment
6. Reboot
7. sudo apt-get install mysql-server :)

N.B. This worked for me! I cannot guarantee that it'll work for you too.

Thank you for your help, today 2 years later i had the same issue with ubuntu 18.04 just installed, solved by your tip .
finopat
 
Posts: 4
Joined: Sat Sep 30, 2017 10:14 pm
languages_spoken: french
ODROIDs: C1

Previous

Return to Ubuntu

Who is online

Users browsing this forum: No registered users and 3 guests