Hostname Already Exists
-
Hello all,
When searching I found a similar issue from a year or so ago with no clear answer.
Here is my problem:
I am trying to add a host to my fog but it keeps saying the host name already exists. When I search my host list, it’s not there. I think I have some kind of corruption or database issue.
Can anyone help me through this step-by-step as I’m not really a Linux or a MySQL person?
-
Find the hostname in the database directly using mysql command line.
if No mysql password.
mysql -u root fog
If mysql password
mysql -u root -p fog
Run:
select hostID from hosts where hostname='HOSTNAMEOFEXISTINGHOST';
Because it doesn’t, most likely, have the mac address associated you won’t see it in the GUI.
Once found you can simply delete the conflicting entry using:
delete from hosts where hostID=HOSTIDRETURNEDFROMSELECTSTATEMENT;
-
Tom, I’m running 14.04.4 LTS Command Line only. I’m sorry, but how do I get to the MySQL part?
-
-
@Tom-Elliott said in Hostname Already Exists:
select hostID from hosts where hostname=‘HOSTNAMEOFEXISTINGHOST’;
I copy / pasted that and I get Empty set as the result.
-
@Vanlue-IT-Guy Copy pasted what?
-
@Tom-Elliott Nevermind, I’m an idiot. I think I found it. I got it. I forgot to change your place holders. Please consider this issue resolved.