MySQL Connection Process Slow for Non-Root User – Troubleshooting

connectionslinuxMySQLmysql-5.6percona

I'm using Percona server 5.6 on Linux.

When I connect to MySQL from the command line as the root user, it connects immediately.

I have also created a new user in the database, but when I try to connect using the newly created user, it pauses for 30 seconds and then it connects.

What could be the problem?

FYI: This question posted by me is also linked to this question if that could help is resolving this question

Another question which might help in solving this question

Best Answer

It looks that server lookup is taking time while searching for the host over the network and in order to minimize the lookup time add the entries in hosts file as entries in hosts file (/etc/hosts) does minimize the lookup time.