<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.14.1">
</HEAD>
<BODY>
On Fri, 2007-04-20 at 01:58 -0400, Kevin J. Cummings wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">OK, a while ago, I setup MythTV on my home server (with a PVR-350 card)</FONT>
<FONT COLOR="#000000">on FC5 before Jarod had updated his instructions for FC5. I muddled</FONT>
<FONT COLOR="#000000">through the installation, using a combination of the FC4 and FC3</FONT>
<FONT COLOR="#000000">instructions, and using RPMS from ATRPMS, I got MySQL, ivtv, and mythtv</FONT>
<FONT COLOR="#000000">all installed an running. Woo Hoo!</FONT>
<FONT COLOR="#000000">I was able to add a new PC5500-HD card to my setup this past Christmas</FONT>
<FONT COLOR="#000000">without any problem. Great! Cool!</FONT>
<FONT COLOR="#000000">Now, I want to add a remote frontend. This requires a change to the</FONT>
<FONT COLOR="#000000">MySQL setup. I have to issue a GRANT command like so:</FONT>
<FONT COLOR="#000000">> $ mysql -u root mythconverg</FONT>
<FONT COLOR="#000000">> mysql> grant all on mythconverg.* to mythtv@"%" identified by "mythtv";</FONT>
<FONT COLOR="#000000">> mysql> flush privileges;</FONT>
<FONT COLOR="#000000">My problem? When I try and login to mysql I can't remember the password</FONT>
<FONT COLOR="#000000">I used for root! I am able to login as mythtv, but trying to issue the</FONT>
<FONT COLOR="#000000">"grant all" command gives me:</FONT>
<FONT COLOR="#000000">ERROR 1044 (42000): Access denied for user 'mythtv'@'localhost' to</FONT>
<FONT COLOR="#000000">database 'mythconverg'</FONT>
<FONT COLOR="#000000">Am I scrod? Can anyone tell me how to re-gain root access to my mysql</FONT>
<FONT COLOR="#000000">database?</FONT>
</PRE>
</BLOCKQUOTE>
NOTE: Posted in the right place this time. List gods, please don't smite me! =(<BR>
<BR>
There may be a more elegant solution, but here's what I did when I accidentally deleted the MySQL root account once (!).<BR>
<BR>
Use the following command to dump your database to disk.<BR>
<BR>
<I>mysqldump -u mythtv -p mythconverg -c > mythtv_backup.sql</I><BR>
<BR>
In Ubuntu, I just go into Synaptic and tell it to "Completely remove" the MySQL server. This basically strips everything MySQL server off the system including configuration files.<BR>
<BR>
Now, reinstall MySQL server - you'll have a clean slate. Change the root password to "password" or something else easy to remember. =P<BR>
<BR>
Now use the following commands to restore your database.<BR>
<BR>
<I>$ mysql -u root -p</I><BR>
<I> mysql>create database mythconverg;</I><BR>
<I> mysql>exit</I><BR>
<I>$ mysql -u mythtv -p mythconverg < mythtv_backup.sql</I>
<PRE>
That should restore your data correctly and give you a fresh database with a root password you know.
Good luck!
-Keller
Reference : <A HREF="http://www.mythtv.org/wiki/index.php/User_Manual:Periodic_Maintenance">http://www.mythtv.org/wiki/index.php/User_Manual:Periodic_Maintenance</A>
</PRE>
</BODY>
</HTML>