mysqld

Upgrading mysql on Ubuntu Lucid Lynx (10.04) hangs

Already the third time this happens to me: An update is available for the mysql server and I just "apt-get upgrade". The upgrade process gets totally stuck at the following task:
Preparing to replace mysql-server-5.1 5.1.66-0ubuntu0.10.04.1 (using .../mysql-server-5.1_5.1.66-0ubuntu0.10.04.2_i386.deb) ...
mysql stop/waiting

The process that got again stuck in some eternal loop (or whatever) is an egrep replacement of some textfile:
egrep -qi -r ^[^#]*ndb.connectstring|^[:space:]*\[[:space:]*ndb_mgmd /etc/mysql/

MySQL install

After installing the Suse 9 rpm, execute the following commands:

sudo /usr/bin/mysql_install_db
(Creating default databases & permissions. Apparently the same can be done by "sudo rcmysql start")

sudo /usr/bin/mysqld_safe --user=mysql &
(Start the server for the first time)
REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! This is done with:

/usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h hostname password 'new-password'