<div dir="ltr">Sorry for taking a week to get back to these helpful suggestions---real job including business trip.<br><br><br><div class="gmail_extra"><div class="gmail_quote">On Mon, Mar 11, 2013 at 1:00 AM, Igor Cicimov <span dir="ltr"><<a href="mailto:icicimov@gmail.com" target="_blank">icicimov@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra">This is what I have on my 12.04<br><br>$ sudo dpkg -l "mysql*" | grep ii<br>
</div></div></blockquote><div><br></div><div>I tried the same on mine:<br><br># sudo dpkg -l "mysql*" <br>Desired=Unknown/Install/Remove/Purge/Hold<br>| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend<br>
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)<br>||/ Name Version Architecture Description<br>+++-=================================-=====================-=====================-=======================================================================<br>
un mysql-client <none> (no description available)<br>un mysql-client-4.1 <none> (no description available)<br>
un mysql-client-5.0 <none> (no description available)<br>un mysql-client-5.1 <none> (no description available)<br>
ii mysql-client-5.5 5.5.29-0ubuntu0.12.10 amd64 MySQL database client binaries<br>un mysql-client-core-5.1 <none> (no description available)<br>
ii mysql-client-core-5.5 5.5.29-0ubuntu0.12.10 amd64 MySQL database core client binaries<br>ii mysql-common 5.5.29-0ubuntu0.12.10 all MySQL database common files, e.g. /etc/mysql/my.cnf<br>
un mysql-common-4.1 <none> (no description available)<br>iU mysql-server 5.5.29-0ubuntu0.12.10 all MySQL database server (metapackage depending on the latest version)<br>
un mysql-server-4.1 <none> (no description available)<br>un mysql-server-5.0 <none> (no description available)<br>
un mysql-server-5.1 <none> (no description available)<br>iF mysql-server-5.5 5.5.29-0ubuntu0.12.10 amd64 MySQL database server binaries and system database setup<br>
un mysql-server-core <none> (no description available)<br>un mysql-server-core-5.0 <none> (no description available)<br>
un mysql-server-core-5.1 <none> (no description available)<br>ii mysql-server-core-5.5 5.5.29-0ubuntu0.12.10 amd64 MySQL database server binaries<br>
<br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">So start from the beginning, remove everything and clear the package cache. </div>
</blockquote><div><br></div><div>The point was, and still is, that I don't seem to be able to remove everything. See below.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">I recommend start using aptitude (I've been using it for more than 3 years now) instead of apt-get which is the recommended package manager by the debian team. It has much better dependencies resolution and is more user friendly than apt-get and I don't really understand why people still stick with apt-get at all (probably because all the tutorials you can find on the net are with old apt-get).<br>
</div></blockquote><div><br></div><div>It's not the tutorials, it's ubuntu itself that tells you to use apt-get to install programs whenever you type the name of one that isn't installed. Example:<br><br>$ ffmpeg<br>
The program 'ffmpeg' is currently not installed. You can install it by typing:<br>sudo apt-get install ffmpeg<br><br></div><div>If they recommend a different one from the debian team, who am I to use something else and then (in the usual pattern) get blamed if the installation is inconsistent? ;-)<br>
</div><div>Anyway, willing to try aptitude, hoping it will solve the problem, but you should take your case for aptitude to the ubuntu team rather than the users.<br></div><div><br><br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr"><div class="gmail_extra">So if lets say I want to completely remove mysql from my system I would go like this:<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">$ sudo su -<br></div><div class="gmail_extra">
# dpkg -P mysql-client mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server mysql-server-5.5 mysql-server-core-5.5<br><div class="gmail_extra"># aptitude clean<br></div># aptitude autoclean<br></div></div></blockquote>
<div><br></div><div>OK, done all that, still didn't clean up all the stuff. See below.<br><br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"></div><div class="gmail_extra">
Then confirm there hasn't been anything left over, if any of the bellow directories exists then manually remove it:<br><br>/etc/mysql<br>/run/mysqld<br>/var/log/mysql<br>/var/lib/mysql<br>/var/lib/mysql/mysql<br>/usr/share/mysql<br>
/usr/include/mysql<br>/usr/lib/mysql<br><br></div><div class="gmail_extra"># rm -rf /etc/mysql /var/lib/mysql /usr/lib/mysql ....... etc<br></div></div></blockquote><div><br></div><div>I have done more---looked for all the directories with a name starting with mysql and moved them to .bak2 (except I didn't bother with the "doc" ones). See below.<br>
<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"></div><div class="gmail_extra">!!!! RESTART !!!!<br>
</div></div></blockquote><div><br></div><div>Did that too.<br></div><div>At this stage I rechecked and I still had leftover junk, though, so I didn't proceed with reinstalling. In particular, the error messages seem to indicate a dependency with mythtv (which needs mysql-client). OK, I know it does, but can't I clean up and reinstall the damn mysql (which appears broken) without having to nuke mythtv too? I feel that would be digging myself into a deeper and deeper hole. It'll be bad enough having to restore the database once mysql comes back up---I'd very much rather not have to do that will all of mythtv, otherwise I might as well reinstall the lot from a blank hard disk...<br>
</div><div><br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra">
Install everything back:<br><br></div><div class="gmail_extra">$ sudo su -<br></div><div class="gmail_extra"># aptitude install mysql-client mysql-common mysql-server<br><br></div><div class="gmail_extra">The mysql-client and mysql-server are all you need (no version extensions) since this mata packages are going to pull in the latest available release of server and client from the repo.<br>
</div></div></blockquote><div><br></div><div>I can try that once I succeed in cleaning the system of mysql.<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr"><div class="gmail_extra">Good luck.<br></div></div></blockquote><div><br></div><div>Thanks, but it looks like I haven't got enough quite yet ;-)<br><br></div><div>Here was my attempt to remove all (as suggested, and based on the output of dpkg-l) and its failed outcome.<br>
<br><br># dpkg -P mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server mysql-server-5.5 mysql-server-core-5.5 <br>dpkg: dependency problems prevent removal of mysql-client-5.5:<br> mythtv-common depends on mysql-client; however:<br>
Package mysql-client is not installed.<br> Package mysql-client-5.5 which provides mysql-client is to be removed.<br><br>dpkg: error processing mysql-client-5.5 (--purge):<br> dependency problems - not removing<br>dpkg: dependency problems prevent removal of mysql-client-core-5.5:<br>
mysql-client-5.5 depends on mysql-client-core-5.5.<br><br>dpkg: error processing mysql-client-core-5.5 (--purge):<br> dependency problems - not removing<br>dpkg: dependency problems prevent removal of mysql-common:<br> mysql-client-5.5 depends on mysql-common (>= 5.5.29-0ubuntu0.12.10.1).<br>
libmysqlclient18:amd64 depends on mysql-common (>= 5.5.29-0ubuntu0.12.10.1).<br><br>dpkg: error processing mysql-common (--purge):<br> dependency problems - not removing<br>(Reading database ... 322308 files and directories currently installed.)<br>
Removing mysql-server ...<br>Removing mysql-server-5.5 ...<br>Purging configuration files for mysql-server-5.5 ...<br>dpkg: warning: while removing mysql-server-5.5, directory '/usr/share/doc/mysql-server-5.5' not empty so not removed<br>
dpkg: warning: while removing mysql-server-5.5, directory '/etc/mysql' not empty so not removed<br>Removing mysql-server-core-5.5 ...<br>Processing triggers for man-db ...<br>Processing triggers for ureadahead ...<br>
Errors were encountered while processing:<br> mysql-client-5.5<br> mysql-client-core-5.5<br> mysql-common<br><br># aptitude clean<br><br># aptitude autoclean<br></div><div><br># for f in `echo /*/mysql* /*/*/mysql* /*/*/*/mysql*` ; do if [[ -d $f ]] ; then echo $f ; fi ; done <br>
/etc/mysql<br>/etc/mysql.bak<br>/run/mysqld<br>/run/mysqld.bak<br>/var/lib/mysql<br>/var/lib/mysql.bak<br>/var/log/mysql<br>/var/log/mysql.bak<br>/var/run/mysqld<br>/var/run/mysqld.bak<br>/lib/init/rw/mysqld<br>/lib/init/rw/mysqld.bak<br>
/usr/share/doc/mysql-client-5.5<br>/usr/share/doc/mysql-client-core-5.5<br>/usr/share/doc/mysql-common<br>/usr/share/doc/mysql-server-5.5<br>/var/lib/mysql.bak/mysql<br>/var/lib/mysql/mysql<br><br><br></div><div>...then here I moved all the remaining mysql directories to .bak2 versions; then rechecked...<br>
</div><div><br># for f in `echo /*/mysql* /*/*/mysql* /*/*/*/mysql*` ; do if [[ -d $f ]] ; then ls -ld $f ; fi ; done <br>drwxr-xr-x 3 root root 4096 Mar 10 20:45 /etc/mysql.bak<br>drwxr-xr-x 2 root root 4096 Mar 16 15:51 /etc/mysql.bak2<br>
drwxr-xr-x 2 mysql root 40 Mar 8 20:16 /run/mysqld.bak<br>drwxr-xr-x 2 mysql root 40 Mar 10 20:56 /run/mysqld.bak2<br>drwx------ 6 mysql mysql 4096 Mar 10 17:33 /var/lib/mysql.bak<br>drwx------ 5 mysql mysql 4096 Mar 10 22:59 /var/lib/mysql.bak2<br>
drwxr-s--- 2 mysql adm 4096 Mar 10 22:46 /var/log/mysql.bak<br>drwxr-s--- 2 mysql adm 4096 Mar 10 20:56 /var/log/mysql.bak2<br>drwxr-xr-x 2 mysql root 40 Mar 8 20:16 /var/run/mysqld.bak<br>drwxr-xr-x 2 mysql root 40 Mar 10 20:56 /var/run/mysqld.bak2<br>
drwxr-xr-x 2 mysql root 40 Mar 8 20:16 /lib/init/rw/mysqld.bak<br>drwxr-xr-x 2 mysql root 40 Mar 10 20:56 /lib/init/rw/mysqld.bak2<br>drwxr-xr-x 2 root root 4096 Mar 3 14:49 /usr/share/doc/mysql-client-5.5<br>drwxr-xr-x 2 root root 4096 Jan 23 23:03 /usr/share/doc/mysql-client-core-5.5<br>
drwxr-xr-x 2 root root 4096 Mar 3 14:49 /usr/share/doc/mysql-common<br>drwxr-xr-x 2 root root 4096 Mar 16 15:51 /usr/share/doc/mysql-server-5.5<br>drwx------ 2 mysql root 4096 Mar 10 22:59 /var/lib/mysql.bak2/mysql<br>drwx------ 2 mysql mysql 4096 Mar 3 13:23 /var/lib/mysql.bak/mysql<br>
<br></div><div>...OK, none left. And for good measure I rebooted and, with the system back up, tried purging the packages again:<br><br></div><div># dpkg -P mysql-server-5.5 mysql-server mysql-client mysql-client-5.5 mysql-client-core-5.5 mysql-common<br>
dpkg: warning: ignoring request to remove mysql-server-5.5 which isn't installed<br>dpkg: warning: ignoring request to remove mysql-server which isn't installed<br>dpkg: warning: ignoring request to remove mysql-client which isn't installed<br>
dpkg: dependency problems prevent removal of mysql-client-5.5:<br> mythtv-common depends on mysql-client; however:<br> Package mysql-client is not installed.<br> Package mysql-client-5.5 which provides mysql-client is to be removed.<br>
<br>dpkg: error processing mysql-client-5.5 (--purge):<br> dependency problems - not removing<br>dpkg: dependency problems prevent removal of mysql-client-core-5.5:<br> mysql-client-5.5 depends on mysql-client-core-5.5.<br>
<br>dpkg: error processing mysql-client-core-5.5 (--purge):<br> dependency problems - not removing<br>dpkg: dependency problems prevent removal of mysql-common:<br> mysql-client-5.5 depends on mysql-common (>= 5.5.29-0ubuntu0.12.10.1).<br>
libmysqlclient18:amd64 depends on mysql-common (>= 5.5.29-0ubuntu0.12.10.1).<br><br>dpkg: error processing mysql-common (--purge):<br> dependency problems - not removing<br>Errors were encountered while processing:<br>
mysql-client-5.5<br> mysql-client-core-5.5<br> mysql-common<br><br><br></div><div>...there we go. Still not purged. Looks like I can't fully clean up the system unless I also purge mythtv.<br></div><div>How can I reinstall and revive mysql without disturbing mythtv?<br>
<br></div></div></div></div>