[mythtv-users] Need help with mysql syntax

Karl Newman newmank1 at asme.org
Sat Oct 5 04:40:31 UTC 2013


On Fri, Oct 4, 2013 at 5:10 PM, Craig Huff <huffcslists at gmail.com> wrote:

> I am in the process of (finally) upgrading from MythBuntu 10.04 to
> MythBuntu 12.04 so I'll be ready (readier?) for the next LTS release.
>
> I am building the new system on a separate disk, so I can switch back and
> forth with a reboot.
> I have the mysql dump from the 10.04 system and have replaced the default
> mythconverg database with the backup, but...
>
> I want to change the passwords in the user table for {user=mythtv,
> host=localhost} to be the one listed in the new system's
> /etc/mythtv/config.xml rather than the one from the old system.  I am
> getting nowhere and getting there really fast.
>
> Apparently, the following is not the right way to get this done.  Any
> advice would be appreciated.
>
> Attempted Procedure:
> 1) Obtain mysql administrator username and password from
> /etc/mysql/debian.cnf and substitute their values for "admin" and
> "admin_pwd" in the following commands.
> 2) Obtain the mythtv user's mysql password for the mythconverg database
> from /etc/mythtv/config.xml and substitute its value for "mythtv_pwd" in
> the following commands.
> 3) Do the following:
> $mysql -u admin -padmin_pwd
> > USE mysql;
> > SELECT host, user, password FROM user;
> > UPDATE user SET password=password('mythtv_pwd') WHERE user='mythtv' AND
> host='localhost';
>
> The response I get is:
> Query OK; 0 rows affected ...
> Rows matched: 1  Changed: 0  Warnings: 0
>
> How should I do this, since my SQL syntax knowledge won't fill a thimble?
>
> TIA,
> Craig.
>
>
I think you want:
SET PASSWORD FOR 'mythtv'@'localhost' = PASSWORD('mythtv_pwd');
FLUSH PRIVILEGES;

The flush privileges may not be required but it can't hurt. Here's the
source: http://dev.mysql.com/doc/refman/5.0/en/set-password.html

Karl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20131004/c853c6d0/attachment.html>


More information about the mythtv-users mailing list