0

I've been working with MySQL for a few months, what was suddenly changed and caused this error? I found this link

Since it's the same issue, where I can find my.ini / my.cnf?
I just need to add skip-name-resolve near to my [mysqld] property in my.ini /my.cnf?

Community
  • 1
  • 1
user1851863
  • 21
  • 1
  • 2
  • possible duplicate of [MySQL error: Can't get hostname from your ip address. What's the problem?](http://stackoverflow.com/questions/5118151/mysql-error-cant-get-hostname-from-your-ip-address-whats-the-problem) – Kate Gregory Nov 26 '12 at 01:10

2 Answers2

1

http://dev.mysql.com/doc/refman/4.1/en/mysql-config-wizard-file-location.html

The Location of the my.ini File In MySQL installations prior to version 4.1.5 it was customary to name the server configuration file my.cnf or my.ini and locate the file either at c:\my.cnf or c:\Windows\my.ini.

The new MySQL Configuration Wizard places the my.ini file in the installation directory of the MySQL server. This helps associate configuration files with particular server instances.

To ensure that the MySQL server knows where to look for the my.ini file, an argument similar to this is passed to the MySQL server as part of the service installation:

--defaults-file="C:\Program Files\MySQL\MySQL Server 4.1\my.ini" Here, C:\Program Files\MySQL\MySQL Server 4.1 is replaced with the installation path to the MySQL Server. The --defaults-file option instructs the MySQL server to read the specified file for configuration options when it starts.

Others:

http://www.electrictoolbox.com/mysql-my-cnf/

CentOS 5 / RHEL 5 For Red Hat Enterprise Linux 5, CentOS 5 and other derived Linux distributions:

/etc/my.cnf

Debian 5 Lenny For Debian 5 Lenny and other derived Linux distros including Ubuntu:

/etc/mysql/my.cnf

MAMP 1.9 on OSX 10.6 Regular MAMP doesn't have one by default (although apparantly MAMP Pro does) but you can either create one yourself at, or copy one of the my-*.cnf files from /Applications/MAMP/Library/share/mysql as:

/Applications/MAMP/Library/my.cnf

MAMP 2.0 on OSX 10.7 As above, and the location is:

/Applications/MAMP/conf/my.cnf
Nesim Razon
  • 9,684
  • 3
  • 36
  • 48
0

I was facing same issue,i was tring to connect to remnote mysql server using my window 7 os machine but in my case disabling firewall solved my problem so you can try it and don't need to change my.cnf or my.ini

Keval
  • 1,857
  • 16
  • 26