|
MySQL - WARNING: The host '$HOSTNAME' could not be looked up with resolveip
|
|
02-26-2012, 06:50 PM
|
|||
|
|||
|
MySQL - WARNING: The host '$HOSTNAME' could not be looked up with resolveip
I've just install MySQL and upon starting the service I've receive the following message:
# service mysqld startI've tried to run resolveip manually and got the following: $ resolveip myhost.mydomain.com resolveip: Unable to find hostid for 'myhost.mydomain.com': host not found [/unix] Although the hostname command gives the correct information: $ hostnameMySQL service seems to be running fine and I can successfully connect to it: $ mysql -u root -p Thanks FreeVPS.us! for the free VPS and for all the knowledge that I've learned here at the forum. |
|||
|
02-26-2012, 07:31 PM
|
|||
|
|||
|
RE: MySQL - WARNING: The host '$HOSTNAME' could not be looked up with resolveip
Sorry, this might sound stupid now but as the hostname for MySQL on your machine is myhost.mydomain.com which does not exist there is this problem.
The domain you used does not exist so MySQL is not able to use it, because it can't resolve it. mydomain.com does exist but myhost.mydomain.com does not. Why don't you change the hostname to the IP or localhost? |
|||
|
02-26-2012, 07:33 PM
(This post was last modified: 02-26-2012 07:34 PM by Retry.)
|
|||
|
|||
|
RE: MySQL - WARNING: The host '$HOSTNAME' could not be looked up with resolveip
That warning is completely normal, nothing to be worried of. I have encountered it in my installation and so will everyone.
Its just cause the domain is not pointed to the respective IP. |
|||
|
02-26-2012, 07:43 PM
|
|||
|
|||
|
RE: MySQL - WARNING: The host '$HOSTNAME' could not be looked up with resolveip
@Murder,
Sorry, I forgot to mention that I've replace my actual hostname and domain name here on my post, like example.com, but actually I'm using a fully qualified domain. @Retry I just want to be sure, I was thinking that this is only important to fix if you will be connecting on MySQL from outside, since when connecting locally you don't even have to specify localhost just "mysql -u username -p". Thanks FreeVPS.us! for the free VPS and for all the knowledge that I've learned here at the forum. |
|||
|
02-26-2012, 09:35 PM
(This post was last modified: 02-26-2012 09:40 PM by KiloServe.)
|
|||
|
|||
|
RE: MySQL - WARNING: The host '$HOSTNAME' could not be looked up with resolveip
Edit your /etc/hosts file and put in (it should already be there and modify it to your FQDN):
Code: 127.0.0.1 mysql.mydomain.com mysqlAlso edit your /etc/my.cnf (if it isn't located in /etc/, try /etc/mysql) Add in this line in the first section: Code: skip-name-resolveThen restart mysql. Code: service mysqld restart |
|||
|
02-26-2012, 10:05 PM
(This post was last modified: 02-26-2012 10:09 PM by Kaloy.)
|
|||
|
|||
|
RE: MySQL - WARNING: The host '$HOSTNAME' could not be looked up with resolveip
@KiloServe,
Thanks! that eliminates the warning message. I did not look at /etc/hosts because I think its already configured since I set my FQDN at SolusVM and besides hostname command gives the correct FQDN. Btw, are you from KiloServe? Thanks FreeVPS.us! for the free VPS and for all the knowledge that I've learned here at the forum. |
|||
|
02-27-2012, 03:51 AM
|
|||
|
|||
|
RE: MySQL - WARNING: The host '$HOSTNAME' could not be looked up with resolveip
SolusVM's hostname changer does nothing on KVM other than change what the control panel says.
If you use the hostname set as in solusvm on the VPS, you need to add an A record for the VPS's hostname to fix this. KVM1 (VPS15/19/25 node) Munin report |
|||
|
02-27-2012, 04:44 PM
|
|||
|
|||
|
RE: MySQL - WARNING: The host '$HOSTNAME' could not be looked up with resolveip
Thanks for clarifying that dmm, I'm still quite new with SolusVM, but its good and has a simple GUI for managing virtual machines. I've also pointed an A record on my DNS provider, I think its all fix now.
Thanks FreeVPS.us! for the free VPS and for all the knowledge that I've learned here at the forum. |
|||
|
« Next Oldest | Next Newest »
|
| User(s) browsing this thread: |
| 2 Guest(s) |







