Resetting root password fails.

This is a discussion on Resetting root password fails. within the MySQL Database forums, part of the Database Forums category; Hi, I'm trying to setup a mysql server, but for some reason it refuses to let me login as ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-06-2008
Sytse
 
Posts: n/a
Default Resetting root password fails.

Hi,

I'm trying to setup a mysql server, but for some reason it refuses to
let me login as root.
I've tried resetting the password with (server running with
--skip-grant-tables):

UPDATE mysql.user SET password=PASSWORD("password") WHERE user="root";
FLUSH PRIVILEGES;

But this does not work (the commands do not update any rows).

Also tried using an init file with (mysqld_safe -–init-file="/tmp/rstpwd"):

SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD("password");

This did not work either.

Does anyone have an idea?

Thanks,

Sytse.
Reply With Quote
  #2 (permalink)  
Old 07-06-2008
Kees Nuyt
 
Posts: n/a
Default Re: Resetting root password fails.

On Sun, 06 Jul 2008 10:14:17 +0200, Sytse
<ssrree00@xxss44aallll.nnll> wrote:

>Hi,
>
>I'm trying to setup a mysql server, but for some reason it refuses to
>let me login as root.
>I've tried resetting the password with (server running with
>--skip-grant-tables):
>
>UPDATE mysql.user SET password=PASSWORD("password") WHERE user="root";
>FLUSH PRIVILEGES;
>
>But this does not work (the commands do not update any rows).
>
>Also tried using an init file with (mysqld_safe -–init-file="/tmp/rstpwd"):
>
>SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD("password");
>
>This did not work either.


Form the manual:
The password format changed in MySQL 4.1, and under
certain circumstances it is possible that if you change
your password, you might not be able to connect to the
server afterward.

>Does anyone have an idea?


This seems to work for me:
GRANT USAGE ON *.* TO 'root'@'localhost' IDENTIFIED BY
'password';
GRANT ALL ON *.* TO 'root'@'localhost' IDENTIFIED BY
'password' WITH GRANT OPTION;

>Thanks,
>
>Sytse.


HTH
--
( Kees
)
c[_] You are about to enter another dimension, a dimension not only of
sight and sound but of mind. A journey into a wondrous land of
imagination. Next stop, Usenet (#163)
Reply With Quote
  #3 (permalink)  
Old 07-07-2008
Sytse
 
Posts: n/a
Default Re: Resetting root password fails.

Kees Nuyt wrote:
> On Sun, 06 Jul 2008 10:14:17 +0200, Sytse
> <ssrree00@xxss44aallll.nnll> wrote:
>
>> Hi,
>>
>> I'm trying to setup a mysql server, but for some reason it refuses to
>> let me login as root.
>> I've tried resetting the password with (server running with
>> --skip-grant-tables):
>>
>> UPDATE mysql.user SET password=PASSWORD("password") WHERE user="root";
>> FLUSH PRIVILEGES;
>>
>> But this does not work (the commands do not update any rows).
>>
>> Also tried using an init file with (mysqld_safe -–init-file="/tmp/rstpwd"):
>>
>> SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD("password");
>>
>> This did not work either.

>
> Form the manual:
> The password format changed in MySQL 4.1, and under
> certain circumstances it is possible that if you change
> your password, you might not be able to connect to the
> server afterward.
>
>> Does anyone have an idea?

>
> This seems to work for me:
> GRANT USAGE ON *.* TO 'root'@'localhost' IDENTIFIED BY
> 'password';
> GRANT ALL ON *.* TO 'root'@'localhost' IDENTIFIED BY
> 'password' WITH GRANT OPTION;
>
>> Thanks,
>>
>> Sytse.

>
> HTH


Sorry, this didn't work either.
I've got no idea what it was, but I made a rather messy freebsd
installation. I think it must have been something with permissions, or a
bad config file. I reinstalled freebsd, this seemed to work.

Regards,

Sytse
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:01 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0