MySQL: trying to create root user Upgrading MySQL database to 5.5 and it seems that the root user has disappeared.

I'm trying to create it again using this commands:

javier@javier-mbp:~$ sudo pkill mysqld
[sudo] password for javier: 
javier@javier-mbp:~$ sudo /usr/local/mysql/bin/mysqld_safe --skip-grant-tables&amp;
[1] 1927
javier@javier-mbp:~$ 111028 16:37:44 mysqld_safe Logging to '/var/log/mysql/error.log'.
111028 16:37:44 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data


Then I do: 

javier@javier-mbp:~$ mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.17-log MySQL Community Server (GPL)

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&gt; GRANT CREATE, DROP ON *.* TO root@localhost IDENTIFIED BY '123456' WITH GRANT OPTION;
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement


Any help?

EDIT: Solved, well… I just should do a backup of the user root since I'm removing the database before upgrading to 5.5.
When you start mysql with --skip-grant-tables, you cannot use GRANT/REVOKE commands. You can INSERT directly into the mysql.user table.

Whereas this command cannot work using --skip-grant-tables:

GRANT CREATE, DROP ON *.* TO root@localhost IDENTIFIED BY '123456' WITH GRANT OPTION;


This command should be run instead:

REPLACE INTO mysql.user SET
user='root',
host='localhost',
password=PASSWORD('123456'),
create_priv='Y',
drop_priv='Y',
grant_priv='Y';


and restart mysql.

You may also want to backup your grants from the previous mysql installation as SQL commands.