root password

root password

am 10.11.2005 07:13:37 von weetat

Hi all ,

I am using mysql-4.1.2 database server . Everything are ok except i
have forget my "root" password for mysql database. see below . How to
reset my root password ?

C:\mysql\mysql-4.1.2-alpha\bin>mysql mysql -u root -p
Enter password: **********
ERROR 1045 (28000): Access denied for user: 'root'@'localhost' (Using
password:
YES)


Thanks


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

RE: root password

am 10.11.2005 08:00:40 von JHN

Stop the current service:
net stop mysql
(or whatever your service name are)

start the mysql deamon with the --skip-grant-tables
C:\mysql\mysql-4.1.2-alpha\bin>mysqld[-nt].exe --skip-grant-tables =
--console

Now you should be able to connect and change the root pw.

stop the deamon.

Start the service again
net start mysql
(or whatever your service name are)

This guide only works if you really have forgotten the pw - if you are =
trying to hack your way into the database, it wont't work ;)

/jesper
-----Original Message-----
From: news [mailto:news@sea.gmane.org]On Behalf Of weetat
Sent: 10. november 2005 07:14
To: win32@lists.mysql.com
Subject: root password


Hi all ,

I am using mysql-4.1.2 database server . Everything are ok except i=20
have forget my "root" password for mysql database. see below . How to=20
reset my root password ?

C:\mysql\mysql-4.1.2-alpha\bin>mysql mysql -u root -p
Enter password: **********
ERROR 1045 (28000): Access denied for user: 'root'@'localhost' (Using=20
password:
YES)


Thanks


--=20
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Djhn@rtx.dk


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org

Re: root password

am 10.11.2005 08:57:02 von weetat

Hi ,

If I want to change my root password to new password without knowing
old password , can it be done ?
If cannot , is the only option is to reinstall the mysql ?

Thanks

Jesper Hørup wrote:
> Stop the current service:
> net stop mysql
> (or whatever your service name are)
>
> start the mysql deamon with the --skip-grant-tables
> C:\mysql\mysql-4.1.2-alpha\bin>mysqld[-nt].exe --skip-grant-tables --console
>
> Now you should be able to connect and change the root pw.
>
> stop the deamon.
>
> Start the service again
> net start mysql
> (or whatever your service name are)
>
> This guide only works if you really have forgotten the pw - if you are trying to hack your way into the database, it wont't work ;)
>
> /jesper
> -----Original Message-----
> From: news [mailto:news@sea.gmane.org]On Behalf Of weetat
> Sent: 10. november 2005 07:14
> To: win32@lists.mysql.com
> Subject: root password
>
>
> Hi all ,
>
> I am using mysql-4.1.2 database server . Everything are ok except i
> have forget my "root" password for mysql database. see below . How to
> reset my root password ?
>
> C:\mysql\mysql-4.1.2-alpha\bin>mysql mysql -u root -p
> Enter password: **********
> ERROR 1045 (28000): Access denied for user: 'root'@'localhost' (Using
> password:
> YES)
>
>
> Thanks
>
>


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

RE: root password

am 10.11.2005 09:12:27 von JHN

If you can start the deamon with the --skip-grant-tables, you can do =
everything, also without knowing the old password.

/jesper


-----Original Message-----
From: news [mailto:news@sea.gmane.org]On Behalf Of weetat
Sent: 10. november 2005 08:57
To: win32@lists.mysql.com
Subject: Re: root password


Hi ,

If I want to change my root password to new password without knowing =

old password , can it be done ?
If cannot , is the only option is to reinstall the mysql ?

Thanks

Jesper H=F8rup wrote:
> Stop the current service:
> net stop mysql
> (or whatever your service name are)
>=20
> start the mysql deamon with the --skip-grant-tables
> C:\mysql\mysql-4.1.2-alpha\bin>mysqld[-nt].exe --skip-grant-tables =
--console
>=20
> Now you should be able to connect and change the root pw.
>=20
> stop the deamon.
>=20
> Start the service again
> net start mysql
> (or whatever your service name are)
>=20
> This guide only works if you really have forgotten the pw - if you are =
trying to hack your way into the database, it wont't work ;)
>=20
> /jesper
> -----Original Message-----
> From: news [mailto:news@sea.gmane.org]On Behalf Of weetat
> Sent: 10. november 2005 07:14
> To: win32@lists.mysql.com
> Subject: root password
>=20
>=20
> Hi all ,
>=20
> I am using mysql-4.1.2 database server . Everything are ok except i=20
> have forget my "root" password for mysql database. see below . How to=20
> reset my root password ?
>=20
> C:\mysql\mysql-4.1.2-alpha\bin>mysql mysql -u root -p
> Enter password: **********
> ERROR 1045 (28000): Access denied for user: 'root'@'localhost' (Using=20
> password:
> YES)
>=20
>=20
> Thanks
>=20
>=20


--=20
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Djhn@rtx.dk


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org

Re: root password

am 10.11.2005 14:16:45 von Daniel da Veiga

When you start your server with the --skip-grant-tables, you have no
access to this tables, thus you're unable to set your password, the
way to reset the password is described at:

http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions .html

Good luck,

On 11/10/05, Jesper H=F8rup wrote:
> If you can start the deamon with the --skip-grant-tables, you can do ever=
ything, also without knowing the old password.
>
> /jesper
>
>
> -----Original Message-----
> From: news [mailto:news@sea.gmane.org]On Behalf Of weetat
> Sent: 10. november 2005 08:57
> To: win32@lists.mysql.com
> Subject: Re: root password
>
>
> Hi ,
>
> If I want to change my root password to new password without knowing
> old password , can it be done ?
> If cannot , is the only option is to reinstall the mysql ?
>
> Thanks
>
> Jesper H=F8rup wrote:
> > Stop the current service:
> > net stop mysql
> > (or whatever your service name are)
> >
> > start the mysql deamon with the --skip-grant-tables
> > C:\mysql\mysql-4.1.2-alpha\bin>mysqld[-nt].exe --skip-grant-table=
s --console
> >
> > Now you should be able to connect and change the root pw.
> >
> > stop the deamon.
> >
> > Start the service again
> > net start mysql
> > (or whatever your service name are)
> >
> > This guide only works if you really have forgotten the pw - if you are =
trying to hack your way into the database, it wont't work ;)
> >
> > /jesper
> > -----Original Message-----
> > From: news [mailto:news@sea.gmane.org]On Behalf Of weetat
> > Sent: 10. november 2005 07:14
> > To: win32@lists.mysql.com
> > Subject: root password
> >
> >
> > Hi all ,
> >
> > I am using mysql-4.1.2 database server . Everything are ok except i
> > have forget my "root" password for mysql database. see below . How to
> > reset my root password ?
> >
> > C:\mysql\mysql-4.1.2-alpha\bin>mysql mysql -u root -p
> > Enter password: **********
> > ERROR 1045 (28000): Access denied for user: 'root'@'localhost' (Using
> > password:
> > YES)
> >
> >
> > Thanks
> >
> >
>
>
> --
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe: http://lists.mysql.com/win32?unsub=3Djhn@rtx.dk
>
>
> --
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe: http://lists.mysql.com/win32?unsub=3Ddanieldaveiga@gma=
il.com
>
>


--
Daniel da Veiga
Computer Operator - RS - Brazil
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
------END GEEK CODE BLOCK------

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org

Re: root password

am 10.11.2005 14:25:27 von Daniel da Veiga

Just correcting my own error, you CAN reset the root password using
skip-grant-tables (that's described later in that same section of the
manual), it is just not secure and thus not adviced, but, well, it can
be done. I personally don't like to mess with the system tables using
normal SQL statements.

--
Daniel da Veiga
Computer Operator - RS - Brazil
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
------END GEEK CODE BLOCK------

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org