To me the update seems fairly pointless, unless there are other users with
the name 'root' in addition to the the two specifiied in the grant
commands.

Specifiy the full path in the '--init-file=' option.

Issue the Flush Privileges command after the two GRANT statements not in
between them.

This is how I would write the init file...

GRANT ALL ON mysql.* TO 'root'@'localhost' IDENTIFIED BY 'XXX';
GRANT ALL ON mysql.* TO 'root'@'173.8.172.53' IDENTIFIED BY 'XXX';
FLUSH PRIVILEGES;


Replacing XXX with the desired password.

Regards
John
> Hi,
>
>    try putting the full path to the init file, and also try putting
> the "update" command after the two grant commands (if you put it first
> and the user r...@173.8.172.53 didn't already exist then the password
> will not be set for that user) and put a flush privileges as the last
> line ,
>
> thanks Andy.
>
> Quoting Jason Todd Slack-Moehrle <mailingli...@mailnewsrss.com>:
>
>> Hi,
>>
>> I am trying:
>>
>> [r...@server1 ~]# /etc/init.d/mysqld restart --init-file=cloudsql.sql
>> Stopping MySQL:                                            [  OK  ]
>> Starting MySQL:                                            [  OK  ]
>>
>> the cloudsql.sql file contains:
>>
>> UPDATE mysql.user SET Password=PASSWORD('xxx') WHERE User='root';
>> FLUSH PRIVILEGES;
>> GRANT ALL ON mysql.* TO 'root'@'localhost';
>> FLUSH PRIVILEGES;
>> GRANT ALL ON mysql.* TO 'root'@'173.8.172.53';
>> commit;
>>
>> But I still get that I cannot connect from 173.8.172.53
>>
>> I still dont see what I am doing wrong...
>>
>> -Jason
>>
>>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=john.dais...@butterflysystems.co.uk
>
>
> ______________________________________________
> This email has been scanned by Netintelligence
> http://www.netintelligence.com/email
>
>



-- 
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