[mythtv-users] Changing hostname instructions
J. Donavan Stanley
jdonavan at jdonavan.net
Tue Jan 6 23:34:27 EST 2004
Alan Snyder wrote:
> 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
Whats wrong with just using a simple SQL update to change the hostname?
No need to drop - grep - restore if all you want to do is change all
occurances of hostxxx with hostyyy...
UPDATE <tablename> SET hostname='hostyyy' WHERE hostname='hostxxx';
Or am I missing something?
More information about the mythtv-users
mailing list