Share on Google+Share on Google+

Deepak Kumar
mysql error 1042 can't get hostname for your address
1 Answer(s)      6 years ago
Posted in : JDBC

Hi,

I am not able to connect to MySQL database. Its giving following error:

mysql error 1042 can't get hostname for your address

How to solve this error?

Thanks

Ads

View Answers

April 13, 2011 at 5:50 PM


Hi,

Find my.ini file of your MySQL Server and then add the following line to it:

skip-name-resolve

Complete code would be:

[mysqld]
port=3306
skip-name-resolve

This should solve the problem.

Thanks










Related Tutorials/Questions & Answers:
mysql error 1042 can't get hostname for your address
mysql error 1042 can't get hostname for your address  Hi, I am not able to connect to MySQL database. Its giving following error: mysql error 1042 can't get hostname for your address How to solve this error? Thanks  
PHP Get Browser IP Address
PHP Get Browser IP Address PHP provides us  $_SERVER['REMOTE_ADDR'] function is used to display the Browser IP address PHP Get IP Address Code: <?php echo "My Browser IP is :". $_SERVER['REMOTE_ADDR']; ?>
Advertisements
can't connect to MySQL Server(10060) - JDBC
can't connect to MySQL Server(10060)  Hii Sir, I am working with a jsp project with MySQL as server. Now i want to host my application. I am... MySQL front end. Can we connect to the MySQL server using the I.P address
Get IP Address Example
Get IP Address Example       This example shows you ip address of your... : NetworkInterface.getNetworkInterfaces() : Network Interface class is used for get name, and a list of IP
Get IP Address in Java
Get IP Address in Java In this example we will describe How to get ip address in java. An IP address is a numeric unique recognition number which...(). getHostAddress(). InetAddress():-The InetAddress is class represents an IP address
get from address using javamail api?
get from address using javamail api?  i want to get from address of particular mail using the javamail api? actually i had done it in one .jsp file... early as possible. thanks for your help
Get your friends' phone numbers
Get your friends' phone numbers  How to create on update trigger
How to get client's address in a servlet
How to get client's address in a servlet       This is detailed java code to get client's address in a servlet. In this example we have used method getremoteAddr
Get the error messages displayed
Get the error messages displayed  How to get the error messages displayed
how to get an lan system ip and mac address in java code
how to get an lan system ip and mac address in java code  strong text
sql query to get name,age,phone,address from tables t1,t2,t3,t4,t5 ..
sql query to get name,age,phone,address from tables t1,t2,t3,t4,t5 ..  ... , address FROM t1 order by name"; this is for 2 tables : query ="SELECT t.name... by name"; i want for 12 tables : i want to fetch name age pwd phone address from 12
Get an Editor to polish your pages
Get an Editor to polish your pages   ... will improve the credibility of your site as bad language makes the users lose confidence in the material that they will find on your site. Editors can also make
Find Your Host Name/IP Address
Find Your Host Name/IP Address   ... the getLocalHost() method to print the Host name as well as the IP Address of the local...;(UnknownHostException e){   System.err.println ("Can't
Error with LogIn with mysql database
Error with LogIn with mysql database  Hi, I have followed steps from your tutorial titled SpringMVClogin with database. I am not using Jetty, as I have Tomcat as my server using Eclipse IDE. When I run the program I get a Http
Java Get IP Address
Java Get IP Address       This section illustrates you how to obtain the IP Address... of "How to get IP Address in Java?": Here is the code of Java Get
How to get factorial in mysql
How to get factorial in mysql  Hi, In order to improve the speed of my queries, one in particular tries to find matches between multiple tables, I... alot for a function in mysql to find factorial numbers of a number and couldn't
Get Noticed with Your Resume
Get Noticed with Your Resume     ... the importance of your resume- they tell you that your resume can make or break your chances to get to the interview. No matter how often repeated, this point could never
why this can't
why this can't  import java.util.*; class Dash{ public static void main(String args[]){ int x0=100; int[] x1=new int[3]; int[][] x2=new int[3][3]; int[][][] x3=new int[3][3][3
backup your MySQL data using mysqldump:cPanel MYSQL 5.1 to 5.5
backup your MySQL data using mysqldump:cPanel MYSQL 5.1 to 5.5  backup your MySQL data using mysqldump:cPanel MYSQL 5.1 to 5.5
getting error in your login form code
getting error in your login form code  i tried your code for login form but i am getting an error.the error is undefined index userid...   hi friend, your form's input must have following : <input type
MySQL 5.1 upgrade to 5.5 error
MySQL 5.1 upgrade to 5.5 error  MySQL 5.1 upgrade to 5.5 error
MySQL 5.1 upgrade to 5.5 error
MySQL 5.1 upgrade to 5.5 error  MySQL 5.1 upgrade to 5.5 error
get and display blob from mysql on jsf
get and display blob from mysql on jsf  i want to get blob from mysql, and display on jsf page. your examples with jsp. i dont find an example with jsf. plese help me about this. thanks..   Have a look at the following
Mysql Date Get Year
Mysql Date Get Year       Mysql Date Get Year is the way of retrieving the current year. Understand with Example The Tutorial illustrate an example from 'Mysql Date Get
error call to undefined function mysql_connect
error call to undefined function mysql_connect  what is error call to undefined function mysql_connect
get info from mysql using jsp and servlet
get info from mysql using jsp and servlet  HELLO! I wanna create a jsp page which able to let me get its name, phone and other info by asking the user to key in their email address from mysql database by using servlet and jsp too
how to get the details of username&password of mysql - JDBC
how to get the details of username&password of mysql  Hi friends, i installed mysql 5.5 on my system successfully,but the thing is i forgotten the username and password .please tell me how to get those details . Thanks
How to Get Traffic from Social Media to Your App?
Ways to get Social Media Traffic on your application page The power of social... effective ways to get traffic from social media to your app. High level of activity... ultimately push people take a look at your new app. Look at most successful apps
Error in MySQL Procedure Using JAVA Code
Error in MySQL Procedure Using JAVA Code  The following Java code (using Connector/J to create a stored procedure on MySQL 5.0) does not execute successfully. Identify the cause and available solutions. statement.execute
Java example program to get IP address of own system
Java example program to get IP address of own system       java get own IP address An IP... the computer system's local host with IP address. Now we can get the IP address
Overview of Networking through JAVA,Find Your Host Name
Find Your Host Name   ...() method and pass it in the object. In this way we find out the ip address... import java.net.*; public class Hostname{   public 
Tutorials   
Java Spring Hibernate Struts Training how to retrieve text and images from mysql database and show on html page using jsp servlet How to install Neo4j on Ubuntu 15.10? please help me in these prog MYSQL - mysql copy table to another table example by creating new table solution for mapping hibernate and pojos from net beans through database Connect GWT application with Oracle inventory System of Medical Store inventory System of Medical Store inventory System of Medical Store inventory System of Medical Store This code have created jTable that connected with a database.every cell of last column have a button.But this button doesn't work properly.Where is the error java program Java Database Program jdbc Database connection class in a live project ..?? What is JDBC architecture? Unable to Create DSN for excel to ms access importing data and edit that data Database Scrolling Buttons how to use foreign key in java How to delete content of a log file from linux terminal? JSP-Oracle connectivity Student Management System Java code for Saving Marathi (Indian local language ) in Mysql and retrieving the same crud operations with foreign key constraint. I really need help with this assignment question Please help me out Please Backup Failed Mysqldump Got Errno 28 On Write Upgrade MySQL 5.1 to 5.5 in cpanel mysqldump all databases com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'jpa.sequence' doesn't exist persistence xml class element persistence.xml for MySQL MySQL JDBC Driver pom dependency code Blob column jdk6 and oracle 8i connexion oracle 8i et jdk6 java [ cannot retrive date from sql ] why?? Order Entry System How to threow timeout exception when DB is not responding How to threow timeout exception when DB is not responding This is the employee form to add data to mysql database but I got error of NullPointerException, Is this write code please give me feedback as soon as possible make a method which takes user name & pwd as parameter & validate them against the database. If the corresponding user exist return true otherwise false. prabhakar validating credentials and displaying error message in login .jsp if not valid JDBC jdbc jdbc code register servlet vibhu connectiondetails from vibhu

Ads

 
Advertisement null

Ads