[BlueOnyx:07925] Re: mysql root password.
Gerald Waugh
gwaugh at frontstreetnetworks.com
Sun Jul 31 08:23:26 -05 2011
Mark McGavin wrote:
> Hi
>
> Can anyone tell me how i change the mysql root password when i have
> lost/ don't know the old one?
>
$ su -
# /etc/init.d/mysqld stop
# /usr/bin/mysqld_safe --datadir=/var/lib/mysql --skip-grant-tables &
# mysql -u root mysql
mysql> update user set Password=PASSWORD('newpwd') where User='root';
mysql> quit
# /etc/init.d/mysqld stop
# /etc/init.d/mysqld start
--
Gerald
More information about the Blueonyx
mailing list