Setting root password on mysql 5.4

Does anyone know how to set root password on a new installation from the post?

Can it be performed after starting the server with
/usr/local/bin/mysqld_safe &

Or for that matter with
/usr/local/bin/mysql_secure_installation

Thanks!
PS: Tried several approaches, need a new beginning
 
From the manual:

% mysql -u root
[CMD="mysql>"]SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd');[/CMD]

or with mysqladmin

% mysqladmin -u root password "newpwd"

Good luck.
 
Back
Top