ACPI administration advocacy advocacy advocacy opinion alsa amarok apache apple apt aptitude archive audio audo authentication automount avi awk backup bash BIOS boot browser business bzip cache calendar calibre cdr cdrecord censorship commandline computerscience console convert cron cut database date debian degree design desktop development disk dpkg dvd economics education emacs email europe exim faad ffmpeg file files firefox firewall flash foss freedom ftp fun fuse git gnumeric graphics grep growisofs grub gtkpod gzip hardware hardware html icedove idiocy image imagemagick images installation ip iphone ipod iptables iso itunes ivman kde kernel keyboard knoppix lame laptop latex libreoffice linux locale lockin locking longlines lsof m4a microsoft mimetypes minitab mogrify mount mp3 mp4 mplayer multimedia music mysql network nfs nfs4 nmap openbox openfiles openoffice opinion opinion orgmode partition pdf pdftk perl php podcast politics pomodoro ports postgresql print printing privacy process programming rant remote rhythmbox rss rsync rxvt scp screengrab screenshot script scripting scsi security sed server services shell siteadmin sitenews sitesoftware skype skype slackware sound sox spam spreadsheet ssh statistics subversion sudo svk swap t23 t43 tar terminal tex text thinkpad thunderbird time timer timezone ubuntu udev upgrade usb usbmount users uuid versioncontrol vfat video vnc windows wine wordpress wordprocessing X40 xwindows xwindows youtube
My system had just upgraded to mysql 5.1. I hadn't intended to upgrade. It was just one of those things that happens when you are trying to upgrade one or two packages on a Debian unstable system and find out that everything breaks.
The end result of this breakage was that mysql was uninstalled.
I needed to reinstall it:
aptitute install mysql-server mysql-client
It seemed to work. But if I (as 'root') tried to grant privileges to another user I got that 'access denied' error. What was going on?
The answer seems to be that when mysql was unintentionally uninstalled, it left the existing database files in place and when version 5.1 was installed it started accessing these old, slightly incompatible files. Running:
mysql_upgrade -u root -p
fixed the problem.
Then a second problem presented itself. The maintenance user 'debian-sys-maint' couldn't access the database. This is a fairly common and often discussed problem.
Logging into mysql as the root user:
mysql -u root -p mysql
and granting privileges to 'debian-sys-maint':
GRANT ALL PRIVILEGES on *.* to 'debian-sys-maint'@'localhost' IDENTIFIED BY '
where <password> is the password listed in /etc/mysql/debian.cnf fixed the problem.