My root user has the following privileges:
mysql> SHOW GRANTS FOR root@'%';
+--------------------------------------------------------------------------------------------------------------+
| Grants for root@% |
+--------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY PASSWORD '*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B' |
| GRANT ALL PRIVILEGES ON `bedrock`.* TO 'root'@'%' |
+--------------------------------------------------------------------------------------------------------------+
When I try to execute the following command, I receive the following error message:
mysqladmin root -pSOMEPASSWORD
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'
Whilst I’m able to execute mysql command normally, I’m not able to do it to mysqld. What’s the problem? Thanks.
For the improvement of the knowledge base:
The problem was in permissions and the command. It works when calling
bin/mysqld_safe --user=mysqlrathermysqladmin root -pSOMEPASSWORD. Note that usermysqlhad already got permissions throught chown -R and chgrp -R.