New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Reinstalling mysql - how?

Got problems with your B2 or B3? Share and get helped!
Hammer
Posts: 124
Joined: 02 Oct 2007, 13:37

Reinstalling mysql - how?

Post by Hammer »

Hi.

Upgraded my bubba and it asked for mysql password when updating the squeezecenter parts.
I didn't remember it (wasn't empty, password: YES) so had to abort.

How do I reinstall mysql and fix the squeeze update?

Thanks.

Hammer


EDIT: Ok, so I tried
mysql -u root
and I got into the mysql prompt. Does this mean I do not have a root password after all?

If so, how do I apply the mysql database update that was in the new core for squeeze?
Tried the
apt-get update
apt-get dist-upgrade
apt-get dist-upgrade squeezecenter

nothing worked. Do I have to uninstall squeeze and reinstall it?
carl
Posts: 474
Joined: 07 May 2008, 04:41

Re: Reinstalling mysql - how?

Post by carl »

Per default there are no mysql password, so for any question given in the upgrade process, a default answer of "yes" should suffice. A fully non interactive upgrade can be accomplished by issuing following:

DEBIAN_FRONTEND=noninteractive apt-get -y -c /etc/apt/bubba-apt.conf update
DEBIAN_FRONTEND=noninteractive apt-get -y -c /etc/apt/bubba-apt.conf dist-upgrade

/Carl
/Carl Fürstenberg, Excito Software Developer
http://www.excito.com
support@excito.com
Hammer
Posts: 124
Joined: 02 Oct 2007, 13:37

Re: Reinstalling mysql - how?

Post by Hammer »

Thanks Carl,

Tried the commands.

DEBIAN_FRONTEND=noninteractive apt-get -y -c /etc/apt/bubba-apt.conf update
Get:1 http://ftp.se.debian.org etch Release.gpg [1032B]
Hit http://ftp.se.debian.org etch Release
Ign http://ftp.se.debian.org etch/main Packages/DiffIndex
Get:2 http://update.excito.org marielle Release.gpg [189B]
Hit http://ftp.se.debian.org etch/main Packages
Get:3 http://update.excito.org upstream_etch Release.gpg [189B]
Hit http://update.excito.org marielle Release
Hit http://update.excito.org upstream_etch Release
Ign http://update.excito.org marielle/main Packages/DiffIndex
Hit http://update.excito.org marielle/main Packages
Ign http://update.excito.org upstream_etch/main Packages/DiffIndex
Hit http://update.excito.org upstream_etch/main Packages
Fetched 3B in 1s (2B/s)
Reading package lists...
bitch:# DEBIAN_FRONTEND=noninteractive apt-get -y -c /etc/apt/bubba-apt.conf dist-upgrade
Reading package lists...
Building dependency tree...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


So sadly it doesn't seem like it upgraded the mysql structure. When trying my squeezbox Duet, it doesn't work.
Do I need to reinstall squeezecenter, and if so, how?

Thanks
carl
Posts: 474
Joined: 07 May 2008, 04:41

Re: Reinstalling mysql - how?

Post by carl »

You can try reinstalling squeezecenter by issuing:
DEBIAN_FRONTEND=noninteractive apt-get -y -c /etc/apt/bubba-apt.conf install --reinstall squeezecenter
or more manually:
apt-get install --reinstall squeezecenter

/Carl
/Carl Fürstenberg, Excito Software Developer
http://www.excito.com
support@excito.com
Hammer
Posts: 124
Joined: 02 Oct 2007, 13:37

Re: Reinstalling mysql - how?

Post by Hammer »

Tried it, didn't work.
Still seems like the mysql changes are not implemented.

How do I reinstall mysql, and will this mess up other things?

Thanks,
Hammer
peter
Posts: 26
Joined: 07 Oct 2008, 09:35
Location: the Netherlands

Re: Reinstalling mysql - how?

Post by peter »

I've got the same problem.
I did not upgrade via the web-gui, but used

Code: Select all

    apt-get update
    apg-get dist-upgrade
I also did not know how to answer the questions about the passwords. So choose to ignore the install errors and continue.

Pressing 'Photo-Album' results in a blank page with the text:

A Database Error Occurred
Unable to connect to your database server using the provided settings.

Can you please tell how to re-install this my-sql part of the upgrade?
asparak
Posts: 173
Joined: 08 Jun 2009, 07:38

Re: Reinstalling mysql - how?

Post by asparak »

check your log files, to see what the output of the error is. That might give a better indication of the reason. It could be a corruption, a password error, or anyone of a number of things.
carl
Posts: 474
Joined: 07 May 2008, 04:41

Re: Reinstalling mysql - how?

Post by carl »

peter wrote:I've got the same problem.
I did not upgrade via the web-gui, but used

Code: Select all

    apt-get update
    apg-get dist-upgrade
I also did not know how to answer the questions about the passwords. So choose to ignore the install errors and continue.

Pressing 'Photo-Album' results in a blank page with the text:

A Database Error Occurred
Unable to connect to your database server using the provided settings.

Can you please tell how to re-install this my-sql part of the upgrade?
The install errors are probably the reason it doesn't work, is it possible for you to post the output from the upgrade errors? also, the output of "dpkg -l | grep -v ^ii" can also be useful.

Sometimes issuing "dpkg --configure -all" can solve the issue, but there is no guaranty. Remember if you have changed the root password for mysql, you need to use that during upgrade process when it asks for it, otherwize the database will never be installed (Default is no password for root ).

/Carl
/Carl Fürstenberg, Excito Software Developer
http://www.excito.com
support@excito.com
peter
Posts: 26
Joined: 07 Oct 2008, 09:35
Location: the Netherlands

Re: Reinstalling mysql - how?

Post by peter »

Just executed the following command:

Code: Select all

dpkg-reconfigure bubba-album
Everything works fine (creating albums, adding images, adding users, viewing albums).

Peter
Hammer
Posts: 124
Joined: 02 Oct 2007, 13:37

Re: Reinstalling mysql - how?

Post by Hammer »

From dkpg logs:

2009-06-30 09:54:15 status installed libpath-class-perl 0.16-0.1
2009-06-30 09:54:15 status unpacked squeezecenter 7.3.2.dfsg-2
2009-06-30 09:54:15 status unpacked squeezecenter 7.3.2.dfsg-2
2009-06-30 09:54:15 status unpacked squeezecenter 7.3.2.dfsg-2
2009-06-30 09:54:15 status unpacked squeezecenter 7.3.2.dfsg-2
2009-06-30 09:54:15 status unpacked squeezecenter 7.3.2.dfsg-2
2009-06-30 09:54:15 status unpacked squeezecenter 7.3.2.dfsg-2
2009-06-30 09:54:15 status unpacked squeezecenter 7.3.2.dfsg-2
2009-06-30 09:54:15 status unpacked squeezecenter 7.3.2.dfsg-2
2009-06-30 09:54:15 status half-configured squeezecenter 7.3.2.dfsg-2
2009-06-30 10:05:52 status installed squeezecenter 7.3.2.dfsg-2
2009-07-01 19:16:37 upgrade squeezecenter 7.3.2.dfsg-2 7.3.2.dfsg-2
2009-07-01 19:16:37 status half-configured squeezecenter 7.3.2.dfsg-2
2009-07-01 19:16:54 status unpacked squeezecenter 7.3.2.dfsg-2
2009-07-01 19:16:54 status half-installed squeezecenter 7.3.2.dfsg-2
2009-07-01 19:17:09 status half-installed squeezecenter 7.3.2.dfsg-2
2009-07-01 19:17:28 status unpacked squeezecenter 7.3.2.dfsg-2
2009-07-01 19:17:29 status unpacked squeezecenter 7.3.2.dfsg-2
2009-07-01 19:17:30 status unpacked squeezecenter 7.3.2.dfsg-2
2009-07-01 19:17:30 status unpacked squeezecenter 7.3.2.dfsg-2
2009-07-01 19:17:30 status unpacked squeezecenter 7.3.2.dfsg-2
2009-07-01 19:17:30 status unpacked squeezecenter 7.3.2.dfsg-2
2009-07-01 19:17:30 status unpacked squeezecenter 7.3.2.dfsg-2
2009-07-01 19:17:30 status unpacked squeezecenter 7.3.2.dfsg-2
2009-07-01 19:17:30 status unpacked squeezecenter 7.3.2.dfsg-2
2009-07-01 19:17:30 status unpacked squeezecenter 7.3.2.dfsg-2
2009-07-01 19:17:30 status half-configured squeezecenter 7.3.2.dfsg-2
2009-07-01 19:18:01 status installed squeezecenter 7.3.2.dfsg-2

And from issuing " dpkg -l | grep -v ^ii"
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-================================-====================================-============================================
rc horde3 3.2.1+debian0-1ex6 horde web application framework


WEEEEEEEE
Now it works!

This is what I tried:
dpkg --configure -all
dpkg-reconfigure bubba-album
apt-get dist-upgrade
DEBIAN_FRONTEND=noninteractive apt-get -y -c /etc/apt/bubba-apt.conf update
DEBIAN_FRONTEND=noninteractive apt-get -y -c /etc/apt/bubba-apt.conf dist-upgrade

and the last line really got the B2 working. It seems like it reinstalled everything...
Strange thing is that the last two lines were the first I tried when Carl suggested them.
Have no idea why it worked the second time, can the lines before matter?

Have probably tried other stuff after first issuing those two lines, all in this thread tho.

Thanks!
Hammer
Posts: 124
Joined: 02 Oct 2007, 13:37

Re: Reinstalling mysql - how?

Post by Hammer »

CRAP.

I have to retract above, it does not work, although I now can browse the B2 for music on my logitech Duo.
It doesn't play the music, and this is the same behaviour as after the bungled upgrade.

So I for a third time have to repeat my question: how do I reinstall MYSQL and does this process mess up anything else?

Thanks.
GNOE Inc..

Re: Reinstalling mysql - how?

Post by GNOE Inc.. »

Maybe a suggestion: Because I'm not a scriptkiddy :roll: and just start to discover Linux I use phpMyAdmin for managing my mysql-databases which can be installed with:

Code: Select all

apt-get install phpmyadmin
Beware that you make a root password for security reasons. When installing apps which use a mysql database, block Bubba's access from the web (to be secure) and remove the mysql root password. After the app is installed put back the mysql root password and restore the Bubba's webaccess (when needed).

Different apps use mysql database, for example bubba-album, horde, mediatomb etc. So backup your database before messing around so that you can always put the original mysql configuration back.

[OFFTOPIC] @Carl, can you please tell me what the instruction

Code: Select all

dpkg -l | grep -v ^ii
precisely does? [/OFFTOPIC]
carl
Posts: 474
Joined: 07 May 2008, 04:41

Re: Reinstalling mysql - how?

Post by carl »

GNOE Inc.. wrote:Maybe a suggestion: Because I'm not a scriptkiddy :roll: and just start to discover Linux I use phpMyAdmin for managing my mysql-databases which can be installed with:

Code: Select all

apt-get install phpmyadmin
Beware that you make a root password for security reasons. When installing apps which use a mysql database, block Bubba's access from the web (to be secure) and remove the mysql root password. After the app is installed put back the mysql root password and restore the Bubba's webaccess (when needed).

Different apps use mysql database, for example bubba-album, horde, mediatomb etc. So backup your database before messing around so that you can always put the original mysql configuration back.

[OFFTOPIC] @Carl, can you please tell me what the instruction

Code: Select all

dpkg -l | grep -v ^ii
precisely does? [/OFFTOPIC]
It's rather simple; "dpkg -l" lists all packages in the system, and their status, where the status is two or three letters at the beginning of each row.
The first letter indicates what out wanted status is, where "i" is "install", "r" is "remove" etc...
Second letter is the actual status of packages, and here "i" is "installed", "c" is "config-files", i.e. is has been uninstalled, but not purged. The three first rows indicates what the letters stand for.

Now, I pipe the output, and greps for enything that doesn't start with "ii", which mean anything that isn't installed and we don't want to install. "ii" is the most common, but often "rc" can be noted, but it's often not a problem and can be ignored.
What we can see is if any packages has failed during upgrade, which can look like following:

Code: Select all

[0:0][azatoth@bubba ~]$ dpkg -l | grep -v ^ii
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name                             Version                                  Description
+++-================================-========================================-============================================
iF  bubba-album                      1.2                                      The codeigniter based album public interface
iU  bubba-frontend                   1.2                                      The codeigniter based frontend for the Bubba
rc  squeezecenter                    7.3.1.dfsg-9                             Streaming Audio Server
Here we see that we want to install bubba-album and bubba-frontend, but bubba-album has failed to install. bubba-frontend hasn't really failed, but is locked due to dependices to bubba-album in this case. squeezecenter is listed because it has been removed in this example, and can be ignored.

I hope you understand what I tried to explain, but if it's anything more, please ask and I'll try to answer it :)
/Carl Fürstenberg, Excito Software Developer
http://www.excito.com
support@excito.com
GNOE Inc..

Re: Reinstalling mysql - how?

Post by GNOE Inc.. »

Clear explanation! Thanx for the effort to explain us the soul of Bubba, it's appreciated! :wink:

In my Bubba|Two the output is

Code: Select all

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name                         Version                              Description
+++-============================-====================================-============================================
rc  horde3                       3.2.1+debian0-1ex6                   horde web application framework
So, this means horde 3 is removed? I didn't remove it and I saw the same in the output Hammer posted earlier in this thread. Do you know what the reason for this is? (just for understanding the principles...)
carl
Posts: 474
Joined: 07 May 2008, 04:41

Re: Reinstalling mysql - how?

Post by carl »

GNOE Inc.. wrote:Clear explanation! Thanx for the effort to explain us the soul of Bubba, it's appreciated! :wink:

In my Bubba|Two the output is

Code: Select all

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name                         Version                              Description
+++-============================-====================================-============================================
rc  horde3                       3.2.1+debian0-1ex6                   horde web application framework
So, this means horde 3 is removed? I didn't remove it and I saw the same in the output Hammer posted earlier in this thread. Do you know what the reason for this is? (just for understanding the principles...)
No, horde3 isn't remove, just the package horde3, which in an earlier version I replaced/renamed to horde3-base.
/Carl Fürstenberg, Excito Software Developer
http://www.excito.com
support@excito.com
Post Reply