Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL error: Can't get hostname from your ip address

Tags:

mysql

hostname

ip

I use my remote MySQL database during long time.

But today I suddenly have found that I cannot connect to the database. I have got an error.

"Can't get hostname from your ip address".

I haven't changed anything in MySQL settings.

What's the problem?

like image 844
Jean Louis Avatar asked Feb 25 '11 14:02

Jean Louis


1 Answers

Just add below in my.ini or my.cnf.

[mysqld]

skip-name-resolve 

Linux:

Otherwise, start MySQL server with the following flag:

sudo service --skip-name-resolve

For more information: http://dev.mysql.com/doc/refman/5.0/en/host-cache.html

like image 188
Ravi Parekh Avatar answered Oct 06 '22 23:10

Ravi Parekh