Re: MySQL admin qref? [Solved]
debian@waysoft.com <debian@waysoft.com>:
> On Sat, 6 Jun 2009 18:41:10 -0600 "s. keeling" <keeling@nucleus.com> wrote:
> > Incoming from Robert Baron:
> > > On Sat, Jun 6, 2009 at 5:13 PM, s. keeling <keeling@nucleus.com>
> > > wrote:
> > > >
> > > > (0) [root] infidel /root_ mysql
> > > > ERROR 1045 (28000): Access denied for user
> > > > 'root'@'localhost' (using password: NO)
> > >
> > > have you tried the following?
> > >
> > > mysqladmin -u root password NEWPASSWORD
> >
> > (0) [root] infidel /root_ mysqladmin -u root password '.........'
> > mysqladmin: connect to server at 'localhost' failed
> > error: 'Access denied for user 'root'@'localhost' (using password:
> > NO)'
>
> Looks like root already has a password set. If so, and you know what
> it is, try...
> mysqladmin -u root -p password NEWPASSWORD
> and you will be prompted for the old password.
>
> If you don't think there is an old password, or you forgot it, try one
> of the sites that explain how to reset a mysql root password, e.g:
> <http://blog.dotkam.com/2007/04/10/mysql-reset-lost-root-password/>
Much appreciated. I wouldn't trust everything on that page (kill -9
mysqld?!?), but this works:
/etc/init.d/mysql stop
mysqld_safe --skip-grant-tables &
mysql -u root
mysql> update user set password=PASSWORD("...") where user="root";
mysql> flush privileges;
mysql> quit;
then:
pkill mysqld_safe
/etc/init.d/mysql start
mysql -u root -p
and that asks for and accepts the new password. Thanks for your help. :-)
And yes, I'm well aware that mysql's root user should not be confused
with system root.
This is lenny, fwiw.
--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://blinkynet.net/comp/uip5.html Linux Counter #80292
- - http://www.faqs.org/rfcs/rfc1855.html Please, don't Cc: me.
Reply to: