Monthly Archives: January 2011

‘Access denied for user ‘debian-sys-maint’@’localhost’

So the other day I made an aptitude safe-upgrade and MySQL was upgraded. Thing is I made some changes and when I tried to restart MySQL I saw the following error.

user@server:~$ sudo /etc/init.d/mysql restart
[sudo] password for user:
Stopping MySQL database server: mysqld failed!
Starting MySQL database server: mysqld already running.
/usr/bin/mysqladmin: connect to server at ‘localhost’ failed
error: ‘Access denied for user ‘debian-sys-maint’@’localhost’ (using password: YES)’
user@server:~$

Well fixing this error is fixed changing the password for MySQL user debian-sys-maint. We will retrieve the password from the file /etc/mysql/debian.cnf.


server:~# cat /etc/mysql/debian.cnf
# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host = localhost
user = debian-sys-maint
password = password
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
user = debian-sys-maint
password = password
socket = /var/run/mysqld/mysqld.sock
basedir = /usr
server:~#

We backup the MySQL databases.


user@server:~$ mysqldump -u root -p –all-databases > /tmp/backup.sql
Enter password:
user@server:~$

Now lets change the debian-sys-maint password in the database.

mysql>GRANT ALL PRIVILEGES ON *.* TO ‘debian-sys-maint’@’localhost’ IDENTIFIED BY ‘password’ WITH GRANT OPTION;

Now we should be able to safely restart the database server.

user@server:~$ sudo /etc/init.d/mysql restart
[sudo] password for user:
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld.
Checking for corrupt, not cleanly closed and upgrade needing tables..
user@server:~$

References:

  1. Ubuntuforums

Beer cheers

One of the good things of living in the States is that I was able to discover good high quality beer and learn to appreciate it. Not Bud Light or Miller, that’s canned pee. Beers like Okocim and Delirium Tremens. Learn what an IPA and a Lager are and so on. So I was looking around for beer culture stuff and found the following cheers. I hope you guys enjoy the cheers.

To the holidays—all 365 of them.

I wish you a Merry Christmas
And a Happy New Year
A pocket full of money
And a cellar full of beer!

Let’s drink the liquid of amber so bright;
Let’s drink the liquid with foam snowy white;
Let’s drink the liquid that brings all good cheer;
Oh, where is the drink like old-fashioned beer?

In heaven there is no beer…
That’s why we drink ours here.

He that buys land buys many stones.
He that buys flesh buys many bones.
He that buys eggs buys many shells,
But he that buys good beer buys nothing else.

Times are hard,
And wages are small,
So drink more beer,
And fuck them all.

When we drink, we get drunk.
When we get drunk, we fall asleep.
When we fall asleep, we commit no sin.
When we commit no sin, we go to heaven.
So, let’s all get drunk, and go to heaven!
–Old Irish toast

Here’s to a long life and a merry one.
A quick death and an easy one.
A pretty girl and an honest one.
A cold beer-and another one!
–Old Irish toast

Here’s to women’s kisses,
and to whiskey, amber clear;
not as sweet as a woman’s kiss,
but a damn sight more sincere.

But if at church they give some ale
And a pleasant fire for our souls to regale
We’d sing and we’d pray all the live long day
Nor ever once from the church to stray.