Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
(SOLVED) changed hostname and ruined everything.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
xavierking
n00b
n00b


Joined: 22 Nov 2006
Posts: 51

PostPosted: Fri Jan 12, 2007 5:02 pm    Post subject: (SOLVED) changed hostname and ruined everything. Reply with quote

hey. as the subject states, i changed my hostname and that ruined everything. my sql database for mythtv, my nvidia driver, and im sure a lot more. should i just backup my config files and do a reinstall?

i added my mythtv user to mysql users as shown on another post


Last edited by xavierking on Sat Jan 13, 2007 8:59 pm; edited 1 time in total
Back to top
View user's profile Send private message
Anon5710
Apprentice
Apprentice


Joined: 23 Jul 2004
Posts: 232
Location: Belgium

PostPosted: Fri Jan 12, 2007 5:04 pm    Post subject: Reply with quote

Not to point out the obvious, but why won't you reset your hostname to what it was in the first place ?
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Fri Jan 12, 2007 5:13 pm    Post subject: Re: changed hostname and ruined everything. Reply with quote

xavierking wrote:
hey. as the subject states, i changed my hostname and that ruined everything. my sql database for mythtv, my nvidia driver, and im sure a lot more. should i just backup my config files and do a reinstall?


You can change the hostname, just do it in a safer way.

First, edit your /etc/conf.d/
Code:

# Set to the hostname of this machine
HOSTNAME="whatever"


And /etc/conf.d/domainname
Code:

DNSDOMAIN="wherever.com"


Then, /etc/hosts, using the info from hostname and domainname, but also adding the info for localhost, which is a default name that should always be present to avoid annoyances:

Code:

127.0.0.1 whatever.wherever.com whatever localhost.localdomain localhost


Then just reboot or restart /etc/init.d/hostname and maybe /etc/init.d/net.lo -not sure if needed, but it will not do any harm either-.
Back to top
View user's profile Send private message
xavierking
n00b
n00b


Joined: 22 Nov 2006
Posts: 51

PostPosted: Fri Jan 12, 2007 5:14 pm    Post subject: Reply with quote

well.. ive already tried to change configs to reflect the new hostname..
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Fri Jan 12, 2007 6:12 pm    Post subject: Reply with quote

xavierking wrote:
well.. ive already tried to change configs to reflect the new hostname..


And are you keeping the localhost.localdmain part as I posted above in /etc/hosts?

If so localhost should be working, and it is not for what it seems...
Back to top
View user's profile Send private message
Hobbes-X
l33t
l33t


Joined: 04 Feb 2004
Posts: 823
Location: Seattle, WA

PostPosted: Fri Jan 12, 2007 6:37 pm    Post subject: Reply with quote

xavierking wrote:
well.. ive already tried to change configs to reflect the new hostname..

You can also change the name myth uses to identify itself in the mysql database by editing mysql.txt:

Quote:
nano -w /etc/mythtv/mysql.txt
DBHostName=localhost


Just change it to your previous hostname, and you're all set. The mysql.txt in your user's directory will override the /etc/mythtv/mysql.txt though, so it's probably just easier to simlink ~/.mythtv/mysql.txt to /etc/mythtv/mysql.txt, unless you actually want to maintain different settings for each user.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Fri Jan 12, 2007 6:58 pm    Post subject: Reply with quote

Hobbes-X wrote:

Just change it to your previous hostname, and you're all set. The mysql.txt in your user's directory will override the /etc/mythtv/mysql.txt though, so it's probably just easier to simlink ~/.mythtv/mysql.txt to /etc/mythtv/mysql.txt, unless you actually want to maintain different settings for each user.


That reminded me one thing. In my examples I assumed that your previous hostname was "localhost", the default, if it wasn't then you need to reconfigure your programs to use your new one. My solution was oriented to let the programs resolve localhost, while you can still keep your new host name.
Back to top
View user's profile Send private message
xavierking
n00b
n00b


Joined: 22 Nov 2006
Posts: 51

PostPosted: Fri Jan 12, 2007 7:13 pm    Post subject: Reply with quote

i dont exactly have access to the computer right now. i will in about 2 hours.

but will that fix my problems with nvidia-settings too?
Back to top
View user's profile Send private message
xavierking
n00b
n00b


Joined: 22 Nov 2006
Posts: 51

PostPosted: Fri Jan 12, 2007 8:33 pm    Post subject: Reply with quote

i just answered my own question. sorta..... i did what you said, 6th. and it worked for nvidia settings. i dunno about myth yet.
Back to top
View user's profile Send private message
xavierking
n00b
n00b


Joined: 22 Nov 2006
Posts: 51

PostPosted: Sat Jan 13, 2007 2:02 pm    Post subject: Reply with quote

well.... after messing with even more configs... and making it even harder on myself.... i kinda wanna just change my hostname back... but either way.. i guess its gonna be hard now... is there anything i can do? mysql doesnt seem to like anything i do anymore.
Back to top
View user's profile Send private message
Hobbes-X
l33t
l33t


Joined: 04 Feb 2004
Posts: 823
Location: Seattle, WA

PostPosted: Mon Jan 15, 2007 2:45 am    Post subject: Reply with quote

xavierking wrote:
mysql doesnt seem to like anything i do anymore.


You might have your mysql permissions based by hostname too? :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum