mysqladmin: connect to server at 'localhost' failed

Mysqladmin is the interesting utility of the mysql database used for administration purposes like startup,shutdown,status. To execute commands we need to use these utilities as privileged users. Here is how we can fix the issues. root@ubuntu:~# mysqladmin status mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: NO)' root@ubuntu:~# mysqladmin -uroot -p status Enter password: Uptime: 938 Threads: 1 Questions: 323 Slow queries: 0 Opens: 263 Flush tables: 1 Open tables: 23 Queries per second avg: 0.344