[mythtv-users] Changing hostname instructions

Alan Snyder ax763 at yahoo.com
Tue Jan 6 15:17:35 EST 2004


I started this thread back in October and finally got
around to my planned
hostname change last night.  For those who are
interested, here are
instructions for smoothly changing a hostname.  I took
Kirby Vandivort's
advice to NOT edit database entries in place!

1.  Stop the backend:
	$ /etc/init.d/mythbackend stop  #If you use an init
script

2.  Change the hostname:
      For most distributions, insert
HOSTNAME=<newhostname> in
/etc/sysconfig/network
      $ hostname <newhostname>

3.  Dump the database per the instructions in the
documentation:
	mysqldump -u mythtv -pmythtv mythconverg -c >
mythtv_backup.sql

4.  Rename the host in the databse.  Be certain that
there are no entries in
the database that are identical to the old hostname
(e.g., grep
<oldhostname> mythtv_backup.sql | more), then do
	$ cat mythtv_backup.sql | sed
s/\'<oldhostname>\'/\'<newhostname>\'/
> mythtv_restore.sql
	
5.  In mysql, drop and recreate the database:
      $ mysql -u root
      mysql>drop database mythconverg;
      mysql>create database mythconverg;
      mysql>create database mythconverg;
	mysql>exit	

6.  Restore using the revised database, per the
instructions in the
documentation:
	mysql -u mythtv -pmythtv mythconverg <
mythtv_restore.sql

6a. I re-did the grant for remote frontends.  I don't
know whether this was
necessary:
	$ mysql -u root
	mysql>grant all on mythconverg.* to
mythtv@"192.168.123.%"
identified by "mythtv"

7.  Start the backend:
	$ /etc/init.d/mythbackend start #or however you do it
on your setup

8.  Quit and restart all frontends.


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus


More information about the mythtv-users mailing list