reverting to passwd-less root w/out --skip-grant-tables

reverting to passwd-less root w/out --skip-grant-tables

am 26.08.2009 03:33:12 von joe

I'm trying to get back to an earlier state where we started
mysqld withOUT --skip-grant-tables but the root user had no
password. Yes, insecure, but we're in restoration mode here.

How do I reset/revert the root password to no password without
running with --skip-grant-tables?

Thanks in advance.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: reverting to passwd-less root w/out --skip-grant-tables

am 26.08.2009 05:51:51 von Walter Heck

Is there a specific reason you cannot do it with --skip-grant-table?

You should theoretically also be able to overwrite the files user.*
(there should be 3) in /var/lib/mysql/mysql/ (replace everything up to
and including teh first mysql in that path with your mysql data dir)
when the server is stopped with a copy from a fresh install. That will
wipe all users in your database though, and might have unforeseen
consequences depending on what you had defined before.

Backup first though!

Walter

On Wed, Aug 26, 2009 at 03:33, Joe wrote:
> I'm trying to get back to an earlier state where we started
> mysqld withOUT --skip-grant-tables but the root user had no
> password.  Yes, insecure, but we're in restoration mode here.
>
> How do I reset/revert the root password to no password without
> running with --skip-grant-tables?
>
> Thanks in advance.
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=3Dlists@o=
lindata.com
>
>

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

Re: reverting to passwd-less root w/out --skip-grant-tables

am 26.08.2009 10:22:49 von Darren Cassar

--0016367f9e5411519a047207283a
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Log in as root and run:

set password = '';
OR
update mysql.user set Password='' where User='root';

this is TOTALLY INSECURE but if that's what you want, then it should do the
trick.

Regards,

Darren Cassar
www.mysqlpreacher.com
www.securich.com

On Wed, Aug 26, 2009 at 2:33 AM, Joe wrote:

> I'm trying to get back to an earlier state where we started
> mysqld withOUT --skip-grant-tables but the root user had no
> password. Yes, insecure, but we're in restoration mode here.
>
> How do I reset/revert the root password to no password without
> running with --skip-grant-tables?
>
> Thanks in advance.
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=info@mysqlpreacher.com
>
>

--0016367f9e5411519a047207283a--

Re: reverting to passwd-less root w/out --skip-grant-tables

am 26.08.2009 17:19:19 von joe

Thanks for the tips, all. Looks like we've got it restored=20
via --skip-grant-tables and restoring some missing user rows=20
(which caused me not to be able to see DBs in 'show databases'). =20
I was also confused about being able to load an empty string ''=20
into the non-null mysql.user.password field. Thanks again.

On Tuesday 25 August 2009 @ 21:51, Walter Heck - OlinData.com=20
wrote:
> Is there a specific reason you cannot do it with
> --skip-grant-table?
>
> You should theoretically also be able to overwrite the files
> user.* (there should be 3) in /var/lib/mysql/mysql/ (replace
> everything up to and including teh first mysql in that path
> with your mysql data dir) when the server is stopped with a
> copy from a fresh install. That will wipe all users in your
> database though, and might have unforeseen consequences
> depending on what you had defined before.
>
> Backup first though!
>
> Walter
>
> On Wed, Aug 26, 2009 at 03:33, Joe=20
wrote:
> > I'm trying to get back to an earlier state where we started
> > mysqld withOUT --skip-grant-tables but the root user had no
> > password.  Yes, insecure, but we're in restoration mode
> > here.
> >
> > How do I reset/revert the root password to no password
> > without running with --skip-grant-tables?
> >
> > Thanks in advance.
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:  
> >  http://lists.mysql.com/mysql?unsub=3Dlists@olindata.co m



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg