I couldn't change root user password on mysql with --skip-grant-tables
First of all, when you start your server with the --skip-grant-tables it's recommended that you use also --skip-networking, so no one can connect from the outside.

Then, once you enter to mysql you should first do:

mysql&gt; FLUSH PRIVILEGES;


And to chance your password you should use the ALTER USER instruction:

mysql&gt; SET PASSWORD FOR 'root'@'localhost' = PASSWORD('YourPass');


After that, disconnect again and restart your server, that should do it.