[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: MySQL admin qref?



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:
> > > 
> > > Hi.  I'm trying to config mysql.  I've done this before, and it
> > > worked well, and I took notes, but they're not helping at the
> > > moment.  I haven't tried everything yet, and I'd rather come up
> > > with a plan than work from flawed notes.
> > >
> > > On Debian, how do you set the mysql root user pword?  I've tried
> > > mysql-admin, but I don't know what I'm doing.  dpkg-reconfigure
> > > was no help.
> > >
> > > Once I can get in, I can create a user and work from there.
> > >
> > > (0) [root] infidel /root_ mysql
> > > ERROR 1045 (28000): Access denied for user
> > > 'root'@'localhost' (using password: NO)
> > >
> > > Once I'm in, I can:
> > >
> > >   update mysql.user set password=password(...) where user='root';
> > >
> > > How's this supposed to be done?
> > 
> > have you tried the following?
> > 
> >   mysqladmin -u root password NEWPASSWORD
> 
> Thanks man.  I've spent hours hunting my notes and history for that.
> I remember doing that.  Now:
> 
> (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)'
> 
> mysqld is running, but this is the first time I've been anywhere near
> this mysql install (and I really hate being a dba.  :-)
> 
> 
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/>

jeff

BTW, mysql root is not the same as Unix root (i.e. superuser).  I do
all mysql configuration and tweaks (including mysql root) from my
(Linux) user (not root) account.  You can try that (although your
system may be set up differently and require (Linux) root???)


Reply to: