我在我的 Hortonworks HDP 上安装了 MySQL 和 MySQL 社区服务器。我开始服务并尝试更改密码
/usr/bin/mysql_secure_installation
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
而且这个过程一次又一次地重复。
skip=grant-tables
我从我的/etc/my.conf
文件中删除
我尝试了 bart 的建议,它首先有效,但后来我遇到了同样的问题。
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
如何解决这个问题?
只需正常停止并重新启动 MySQL。
编辑
否则:
确保刷新权限:
从文档中: