MySQL error: failed to connect to server on ‘’ (113)

Sometimes using MySQL Workbench I am getting this kind of errors:

Failed to Connect to MySQL at with user db_user
Can’t connect to MySQL server on ‘’ (113)

To fix it add configuration directive:
skip_name_resolve = off
to main MySQL configuration file /etc/my.cnf using your favorite text editor (mine is Vim).
to section [mysqld]
and restart MySQL server using command as root:

# /etc/init.d/mysqld restart