It will affect all users named root.  If you need to limit it on a
per-host basis, first SELECT User, Host from mysql.user where User
='root' and qualify with the update with the Host names you find
there.

 - md

On Mon, Nov 29, 2010 at 1:58 PM, Wagner Bianchi
<wagnerbianch...@gmail.com> wrote:
> Hi Michael,
>
> I am not sure whether your UPDATE statement will affect all "root" users
> password or only which one that will access from a localhost.
>
> Best regards.
> --
> WB
>
> 2010/11/29 Michael Dykman <mdyk...@gmail.com>
>>
>> as root, stop your mysql server in the normal way
>> ie :$ service mysqld stop
>>
>> run mysql explicitly to skipp credentials
>>
>> ie. (run it in the back ground)
>>
>> $ /usr/libexec/mysqld --skip-grant-tables  &
>>
>> once the server starts, you should be able to:
>> $ mysql -u root
>>
>> assming you get in (no reason you shouldn't if you got this far), you
>> can use SQL statements to manipulate user data; you can't use GRANT or
>> SET PASSWORD so
>>
>> use mysql;
>>
>> update user set Password = PASSWORD('yourpassword') where User = 'root';
>>
>> exit your session and kill your mysqld process. (get the pid via ps
>> -aux, then kill that)
>>
>> restart mysql normally, and you should be good.  (I had to do this
>> over the weekend on a system someone else setup but failed to record
>> the credentials).
>>
>>  - michael dykman
>>
>> On Mon, Nov 29, 2010 at 12:28 PM, Maurizio Ponti
>> <maurizio.po...@gmail.com> wrote:
>> > Dear Sirs, I would like to post the list:
>> >
>> > Topic: mysql server installation, password problems
>> >
>> > Dear Sirs, I downloaded the last MySQL server version some weeks ago,
>> > then I forgot the root password. I disinstalled everything and
>> > reinstalled from new, but I'm always asked for the old password in order
>> > to define a new one. It seems that an old file related to the password
>> > is still there in my computer and I could not erase it by disinstalling
>> > the server. Could you tell me which is the file and how could I delete
>> > it? Or what should I do in order to solve the problem? Thank you very
>> > much. Maurizio
>> >
>>
>>
>>
>> --
>>  - michael dykman
>>  - mdyk...@gmail.com
>>
>>  May the Source be with you.
>>
>> --
>> MySQL General Mailing List
>> For list archives: http://lists.mysql.com/mysql
>> To unsubscribe:
>>  http://lists.mysql.com/mysql?unsub=wagnerbianch...@gmail.com
>>
>
>



-- 
 - michael dykman
 - mdyk...@gmail.com

 May the Source be with you.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to