I installed MySQL and the MySQL community server on my Hortonworks HDP. I started service and tried to change password


Securing the MySQL server deployment.

Connecting to MySQL using a blank password.
The 'validate_password' plugin is installed on the server.
The subsequent steps will run with the existing configuration
of the plugin.
Please set the password for root here.

New password: 

Re-enter new password: 

Estimated strength of the password: 50 
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
 ... Failed! Error: The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

And this process is repeating again and again.

I deleted skip=grant-tables from my /etc/my.conf file

I tried what bart suggested, It worked in the first place but then i have the same problem.

I logged as a root.
mysql> create database registry;
Query OK, 1 row affected (0.05 sec)

mysql> CREATE USER 'registry'@'%' IDENTIFIED BY 'R12$%34qw';
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

How to fix this?


Just stop and restart MySQL normally.



Make sure you flush the privileges:


From the documentation:


Reloads the privileges from the grant tables in the mysql database.

The server caches information in memory as a result of GRANT and CREATE USER statements. This memory is not released by the corresponding REVOKE and DROP USER statements, so for a server that executes many instances of the statements that cause caching, there will be an increase in memory use. This cached memory can be freed with FLUSH PRIVILEGES.

  • Take a look my edit. – Richard Rublev Jul 29 at 8:52
  • see my edit here – Bart Jul 29 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.