Gosh darnit!

Does anyone have any clue why I am having problems setting the root password for mysql?

I've been following the hand-dany tutorial on the O'Reilly website about Apache/PHP/MySQL but have gotten stuck on a seemingly basic problem. Having installed mysql ok when I go to set the root user password using these two recommended commands:

/usr/local/mysql/bin/mysqladmin -u root password <password>
/usr/local/mysql/bin/mysqladmin -u root -h `hostname` password <password>

The first command works fine but the second brings up an error:

connect to server at 'pd.local.' failed
error: 'Host '' is not allowed to connect to this MySQL server'

Anyone have a clue why?

Might it be because of the IP address of the host being on a LAN?

I've searched around and can't find any advice.... anyone?