HI Elena,
If you know root password, then you can reset for accounting user as
[root@apel2 ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 50130
Server version: 5.0.95 Source distribution
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> update user set password=PASSWORD("newpassword") where User='accounting';
Query OK, 6 rows affected (0.08 sec)
Rows matched: 6 Changed: 6 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.05 sec)
mysql> quit
On Sat, Nov 24, 2012 at 11:49 AM, Elena Korolkova
<[log in to unmask]> wrote:
> Hi Steve
>
> Thanks you very much for a quick reply on Saturday.
>
> It could look very stupid but I can't find valid password.
> The one I can find with
> [root@lcgce2 ~]# cat site-info.def |grep APEL_DB_PASSWORD
>
> doesn't work.
> I've tried other possible options.
>
> Is there a way to find out/change password.
>
> Thank you
> Elena
>
>
> On 24 Nov 2012, at 11:07, Steve Jones wrote:
>
>> Hi,
>>
>> [root@lcg ~]# mysql --pass="$MYSQL_PASSWORD" --exec "grant all on
>> accounting.* to [log in to unmask] ideElenantified by
>> '***';" ERROR 1045 (28000): Access denied for user 'root'@'localhost'
>> (using password: NO)
>>
>> It looks like the wrong password to the APEL box. So try this:
>>
>> /usr/bin/mysqladmin -u root --password=THEPASSWORD status
>>
>> and:
>>
>> /usr/bin/mysqladmin -u root -h APELBOX.ABC.DEF.COM--password=THEPASSWORD
>> status
>>
>> to check if you have the password right, or this:
>>
>> /usr/bin/mysqladmin -u root password THEPASSWORD
>>
>> and:
>>
>> /usr/bin/mysqladmin -u root -h APELBOX.ABC.DEF.COM password THEPASSWORD
>>
>> to set the pw to something you know. Once you get the password right, you
>> can do this:
>>
>> /usr/bin/mysql --pass= THEPASSWORD --exec \"grant all on accounting.* to
>> [log in to unmask] identified by 'THEPASSWORD'\"
>>
>> Maybe that might be the right track?
>>
>> Steve
>
> __________________________________________________
> Dr Elena Korolkova
> Email: [log in to unmask]
> Tel.: +44 (0)114 2223553
> Fax: +44 (0)114 2223555
> Department of Physics and Astronomy
> University of Sheffield
> Sheffield, S3 7RH, United Kingdom
>
|