Mar. 12th, 2008

alexpgp: (Default)
I always seem to have the devil's own time getting mysql up and running. Starting with a fresh install, I tried to set a password for the root user and was rebuffed, as if somehow one had already been set.

After several attempts, I finally stumbled across one method of 'resetting' the password that worked.

1. Stop mysqld and restart it with the following command line parameters (for this, I didn't feel compelled to invoke the daemon using mysqld_safe):
       mysqld --skip-grant-tables --user=root &

2. Invoke mysql -u root from the command line.

3. Invoke the following at the mysql> prompt:
       UPDATE mysql.user SET Password=PASSWORD('xxx') WHERE User='root';
       FLUSH PRIVILEGES;
       quit

Me, I reboot afterward.

Cheers...

P.S. Apparently, during installation, mysql-server asks for a root password that I obviously didn't pay attention to when I unthinkingly entered it. Yeow!

Profile

alexpgp: (Default)
alexpgp

January 2018

S M T W T F S
  1 2 3456
7 8910111213
14 15 16 17181920
21222324252627
28293031   

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 10th, 2025 03:56 am
Powered by Dreamwidth Studios