[mythtv-users] How to repair mysql?

UB40D ub40dd at googlemail.com
Sun Mar 10 17:53:55 UTC 2013


Thanks Bill.

On Sun, Mar 10, 2013 at 4:20 PM, Bill Meek <keemllib at gmail.com> wrote:

> On 03/10/2013 04:10 AM, UB40D wrote:
> ...
>
>  # apt-get install mysql-server mysql-server-5.5
>>
> ...
>
> Hi;
>
> Not sure if it hurts, but I never try to install the meta package and
> the package itself, so you could retry Igor's -P suggestion to get a
> fresh (uninstalled) start and then "apt-get install mysql-server" only
> (which will select the -5.5 package.)
>
>
OK, I attempted that.
In the spirit of leaving no stone unturned I did so in two variants:
1) without setting a password (hoping it would make it all simpler)
2) setting a password (hoping it would make it closer to the std case)
but could get neither to work. Details below, with my comments inlined.



> You can google as well as I can, but see things like:
>
>     sudo dpkg-reconfigure mysql-server-5.5
>
> from: http://askubuntu.com/**questions/21231/why-is-mysql-**
> unable-to-configure<http://askubuntu.com/questions/21231/why-is-mysql-unable-to-configure>
>
> after searching for:
>
>
>     dpkg: error processing mysql-server-5.5 (--configure):
>

Tried that too, did no good---see below at the end.


# dpkg -P mysql-server-5.5 mysql-server
(Reading database ... 322308 files and directories currently installed.)
Removing mysql-server-5.5 ...
Purging configuration files for mysql-server-5.5 ...
dpkg: warning: while removing mysql-server-5.5, directory
'/usr/share/doc/mysql-server-5.5' not empty so not removed
Removing mysql-server ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...

------------------
Did it work? Usually seems to.
------------------

# dpkg -l mysql-server mysql-server-5.5
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
un  mysql-server   <none>                    (no description available)
dpkg-query: no packages found matching mysql-server-5.5


--------------
Looks like it worked, but still unclear why it can't find the second
package.
Next I'll install mysql-server, with no root password.
--------------


# apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  mysql-server-5.5
Suggested packages:
  tinyca mailx
The following NEW packages will be installed:
  mysql-server mysql-server-5.5
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/8,851 kB of archives.
After this operation, 32.8 MB of additional disk space will be used.
Do you want to continue [Y/n]?
Preconfiguring packages ...
Selecting previously unselected package mysql-server-5.5.
(Reading database ... 322221 files and directories currently installed.)
Unpacking mysql-server-5.5 (from
.../mysql-server-5.5_5.5.29-0ubuntu0.12.10.1_amd64.deb) ...
Selecting previously unselected package mysql-server.
Unpacking mysql-server (from
.../mysql-server_5.5.29-0ubuntu0.12.10.1_all.deb) ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Setting up mysql-server-5.5 (5.5.29-0ubuntu0.12.10.1) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              dpkg:
dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.5; however:
  Package mysql-server-5.5 is not configured yet.

dpkg: error processing mysql-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Processing
triggers for ureadahead ...
Errors were encountered while processing:
 mysql-server-5.5
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)


----------------------------
During the above, it asked for a root password 3 times, with a box that
said:

| While not mandatory, it is highly recommended that you set a password
| for the MySQL administrative "root" user.
| If this field is left blank, the password will not be changed.

I always pressed enter.
Clearly this didn't work.
----------------------------

# dpkg -l mysql-server
mysql-server-5.5 Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
iU  mysql-server   5.5.29-0ubun all          MySQL database server
(metapackag
iF  mysql-server-5 5.5.29-0ubun amd64        MySQL database server binaries
an


---------------------------------
The packages are there, but both in a bad condition (uppercase=bad)
Let's get rid of them and try again, this time with a test password.
--------------------------------


# dpkg -P mysql-server-5.5 mysql-server
(Reading database ... 322308 files and directories currently installed.)
Removing mysql-server-5.5 ...
Purging configuration files for mysql-server-5.5 ...
dpkg: warning: while removing mysql-server-5.5, directory
'/usr/share/doc/mysql-server-5.5' not empty so not removed
Removing mysql-server ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...

# dpkg -l mysql-server mysql-server-5.5
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
un  mysql-server   <none>                    (no description available)
dpkg-query: no packages found matching mysql-server-5.5


-------------------------------
Below, I installed with a test password.
-------------------------------

# apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  mysql-server-5.5
Suggested packages:
  tinyca mailx
The following NEW packages will be installed:
  mysql-server mysql-server-5.5
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/8,851 kB of archives.
After this operation, 32.8 MB of additional disk space will be used.
Do you want to continue [Y/n]?
Preconfiguring packages ...
Selecting previously unselected package mysql-server-5.5.
(Reading database ... 322221 files and directories currently installed.)
Unpacking mysql-server-5.5 (from
.../mysql-server-5.5_5.5.29-0ubuntu0.12.10.1_amd64.deb) ...
Selecting previously unselected package mysql-server.
Unpacking mysql-server (from
.../mysql-server_5.5.29-0ubuntu0.12.10.1_all.deb) ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Setting up mysql-server-5.5 (5.5.29-0ubuntu0.12.10.1) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--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.5; however:
  Package mysql-server-5.5 is not configured yet.

dpkg: error processing mysql-server (--configure):
 dependency problems - leaving unconfigured
Processing triggers for ureadahead ...
No apport report written because the error message indicates its a followup
error from a previous failure.
                          Errors were encountered while processing:
 mysql-server-5.5
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)


-------------------------------------------------
It popped up this dialog box once:

| While not mandatory, it is highly recommended that you set a password
| for the MySQL administrative "root" user.
| If this field is left blank, the password will not be changed.

I inserted the test password. It asked for it again. I did. Then it mumbled
to itself a bit more and issued another dialog:

 │ Unable to set password for the MySQL "root" user
 │
 │ An error occurred while setting the password for the MySQL
 │ administrative user. This may have happened because the account already
 │ has a password, or because of a communication problem with the MySQL
 │ server.
 │
 │ You should check the account's password after the package installation.
 │
 │ Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for
 │ more information.

and concluded with the above error message.
-----------------------------------------------


# dpkg -l mysql-server mysql-server-5.5
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
iU  mysql-server   5.5.29-0ubun all          MySQL database server
(metapackag
iF  mysql-server-5 5.5.29-0ubun amd64        MySQL database server binaries
an


----------------------------------
Still broken, obviously.
I read the specified readme, which among other things said:

| * PASSWORDS:
| ============
| It is strongly recommended to set a password for the mysql root user
(which
|   /usr/bin/mysql -u root -D mysql -e "update user set password=password(
| 'new-password') where user='root'"
|   /usr/bin/mysql -u root -e "flush privileges"
| If you already had a password set add "-p" before "-u" to the lines above.

So I tried that too, both without and with -p.
------------------------------------


# /usr/bin/mysql -u root -D mysql -e "update user set
password=password('test') where user='root'"
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)


# /usr/bin/mysql -p -u root -D mysql -e "update user set
password=password('test') where user='root'"
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)


--------------------------
Still no good.
Finally I tried your last suggestion:
--------------------------

# dpkg-reconfigure mysql-server-5.5
/usr/sbin/dpkg-reconfigure: mysql-server-5.5 is broken or not fully
installed



--------------------------
What other hope have I got?

I would have thought that if dpkg -P really gets rid of the packages (which
it seems to) then it shouldn't be such a big deal just to install mysql on
an allegedly clean system, right? What am I doing wrong here?
---------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20130310/e49290a9/attachment-0001.html>


More information about the mythtv-users mailing list