[mythtv-users] What to do when you can't remember the password for mysql
Kevin J. Cummings
cummings at kjchome.homeip.net
Fri Apr 20 06:53:25 UTC 2007
Keller Giacomarro wrote:
>
> NOTE: Posted in the right place this time. List gods, please don't
> smite me! =(
>
> There may be a more elegant solution, but here's what I did when I
> accidentally deleted the MySQL root account once (!).
>
> Use the following command to dump your database to disk.
>
> mysqldump -u mythtv -p mythconverg -c > mythtv_backup.sql
>
> 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.
>
> Now, reinstall MySQL server - you'll have a clean slate. Change the
> root password to "password" or something else easy to remember. =P
Thanks! B^)
> Now use the following commands to restore your database.
>
> $ mysql -u root -p
> mysql>create database mythconverg;
> mysql>exit
> $ mysql -u mythtv -p mythconverg < mythtv_backup.sql
Worked like a champ!
>
> That should restore your data correctly and give you a fresh database with a root password you know.
>
> Good luck!
>
> -Keller
--
Kevin J. Cummings
kjchome at rcn.com
cummings at kjchome.homeip.net
cummings at kjc386.framingham.ma.us
Registered Linux User #1232 (http://counter.li.org)
More information about the mythtv-users
mailing list