/usr/local/mysql/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

I have created mysqld.sock and gave permission to it too. but still get the same error.

The socket location is normally specified in the mysql.cnf file (/etc/mysql/mysql.cnf or /etc/mysql.cnf or whatever), in the section headed "[mysqld]". If there is no socket entry in there, then the server will use the compiled in default which is /tmp/mysql.sock. You can always stop (or kill) the server, and add an explicit socket entry into the config file like:

[mysqld]
socket=/var/run/mysqld/mysqld.sock

It is worth adding the same to the [client] section so all the client tools have the same idea.