Error 1042 trying to access Mysql using Sqlyog

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Error 1042 trying to access Mysql using Sqlyog

Postby natmanu » 08. June 2011 01:39

Hi,

I've been using Xampp for a while as our internal development server. So far it does all what we've asked of it.

recently I installed a new version and have it up on a machine on my local server. I can access the website using localhost or the IP address for the machine on the LAN. And I can also access the website from different machines on the server using the machine's IP address. My webpages are PHP mysql based so when the other machine have no problems being server my webpages.

But when I try to access the mysql database using sqlyog I get the error: '1042 cannot get hostname for your address'. This something I used to do before so I not sure why it is not working now. I'm using the same IP address to access the website through the browser on the networked machine! It seems like the network machine can not find the mysql server on the IP address using sqlyog

i's running:

ApacheFriends XAMPP (Basispaket) version 1.7.4

is there a new default configuration that is causing this? All services are running fine.

Any advice is very welcomed. TIA
Nat
natmanu
 
Posts: 1
Joined: 08. June 2011 01:24

Re: Error 1042 trying to access Mysql using Sqlyog

Postby Sharley » 08. June 2011 02:46

Hello Nat,
natmanu wrote:But when I try to access the mysql database using sqlyog I get the error: '1042 cannot get hostname for your address'
In the target MySQL installation, open the \xampp\mysql\bin\my.ini file in your text editor and add this line in the section:
#The MySQL server
[mysqld]
Code: Select all
skip-name-resolve

Save the file and restart MySQL - please do make a backup copy of the my.ini file before editing so you can revert to a know working file if things go pear shaped.

Try again to access the target installation's database using the software you mentioned.

This disables the DNS lookup by MySQL for connecting peers - the down side is you can use only IP addresses in the MySQL grant tables.

There is another more complicated method if you find you have issues with the above simple resolution.

BTW, in future could you please try and enter any full and correct error messages you may receive, as this really does help with accurate troubleshooting.
Thanks and best wishes.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 62 guests