Skip to content

Month: August 2009

RHEL 5.3 and Depsolve problems in Yum

During some recent server patches on Red Hat Enterprise Linux 5.3, I kept getting ‘depsolve’ errors on several packages. This was odd, as I had not made any changes to anything, installed anything new, or removed anything.

Turns out this is a known bug in 5.3, and luckily, the solution is simple:

$> yum clean all

Run that, and it refreshes your local repository. The next time you go to update packages your server will refresh everything with the Red Hat respository, and all will be good!

How to recover MySQL’s “root” password quickly

Have you ever been in a rush or just had a complete brain freeze with your MySQL passwords?

Well…..I have.  🙂


Step # 1 : Stop mysql service

SHELL> /etc/init.d/mysql stop


Step # 2: Start to MySQL server w/o password:

SHELL> mysqld_safe --skip-grant-tables &


Step # 3: Connect to mysql server using mysql client and setup the new root password:

SHELL> mysql -u root
mysql> use mysql;
mysql> update user set password=PASSWORD("$PASSWORD") where User='root';
mysql> flush privileges;
mysql> quit


Step #4: Stop and Restart MySQL Server: (try your new $PASSWORD)

SHELL> /etc/init.d/mysql stop
SHELL> /etc/init.d/mysql start
SHELL> mysql -u root -p


Note: There are other ways to reset the password, but I like this one.