mysqld has the very nasty habit of routing TCP/IP DB connections via 127.0.0.1 port 3306 into the socket file.
To see this, just login to mysql and run this command:
mysql> SELECT USER(),CURRENT_USER();
The USER() function tells you how you tried to authenticate
The CURRENT_USER() function tells you how mysqld allowed you to authenticate
If you see root@localhost for CURRENT_USER(), then TCP/IP is not being used.
@Khaled already mentioned doing this:
mysql -h your_sever_ip_addr --protocol=tcp -p
Here is something for you to research
Run this command
SELECT CONCAT(user,'@',host) RootUser,password FROM mysql.user WHERE user='root';
You should already have root@localhost. You should also have root@127.0.0.1 with either the same password as root@localhost or a different one if you so choose.
If you do not have root@127.0.0.1, here is how to create root@127.0.0.1 with the same password as root@localhost:
CREATE TABLE mysql.roothome LIKE mysql.user;
INSERT INTO mysql.roothome SELECT * FROM mysql.user
WHERE user='root' AND host='localhost';
UPDATE mysql.roothome SET host='127.0.0.1';
INSERT INTO mysql.user SELECT * FROM mysql.roothome;
DROP TABLE mysql.roothome;
FLUSH PRIVILEGES;
Here is how to create root@127.0.0.1 with a different password from root@localhost:
CREATE TABLE mysql.roothome LIKE mysql.user;
INSERT INTO mysql.roothome SELECT * FROM mysql.user
WHERE user='root' AND host='localhost';
UPDATE mysql.roothome SET host='127.0.0.1',password=password('whateveryouwant');
INSERT INTO mysql.user SELECT * FROM mysql.roothome;
DROP TABLE mysql.roothome;
FLUSH PRIVILEGES;
Give it a Try !!!