[mythtv-users] db restore

Stephen Worthington stephen_agent at jsw.gen.nz
Sun Aug 5 15:06:15 UTC 2018


On Sun, 5 Aug 2018 10:48:01 -0400, you wrote:


>I'm still getting nowhere:
> daryl at trieli:~$ ./mythconverg_restore.pl --create_database --directory ~
>--filename mythconverg-1344-20180804112717.sql.gz --verbose
>
>Configuring environment:
>  -    username: daryl
>  -        HOME: /home/daryl
>  - MYTHCONFDIR: /home/daryl/.mythtv
>
>Parsing configuration files:
>  - checking: /home/daryl/.mythtv/config.xml
>  - checking: /usr/local/share/mythtv/mysql.txt
>  - checking: /usr/share/mythtv/mysql.txt
>  - checking: /usr/local/etc/mythtv/mysql.txt
>  - checking: /etc/mythtv/mysql.txt
>  - checking: /home/daryl/.mythtv/mysql.txt
>  - checking: mysql.txt
>  - checking: /home/daryl/.mythtv/mysql.txt
>  - checking: /home/daryl/.mythtv/backuprc
>
>Applying command-line arguments.
>
>Checking configuration.
>
>WARNING: DBName not specified. Using mythconverg
>
>WARNING: DBHostName not specified.
>         Assuming it is specified in the MySQL options file.
>
>WARNING: DBUserName not specified.
>         Assuming it is specified in the MySQL options file.
>
>WARNING: DBPassword not specified.
>         Assuming it is specified in the MySQL options file.
>
>Database Information:
>         DBHostName:
>             DBPort: -1
>         DBUserName:
>         DBPassword:
>             DBName: mythconverg
>        DBSchemaVer:
>  DBBackupDirectory: /home/daryl
>   DBBackupFilename: mythconverg-1344-20180804112717.sql.gz
>      drop_database: no
>    create_database: yes
>
>Executables:
>       mysql_client: mysql
>         uncompress: gzip -d
>
>Miscellaneous:
>    partial_restore: no
>   restore_xmltvids: no
>    change_hostname: no
>
>Checking database.
>DBI connect('host=:database=mythconverg','',...) failed: Access denied for
>user 'daryl'@'localhost' (using password: NO) at ./mythconverg_restore.pl
>line 933.
>
>Preparing initial database.
>DBI connect('host=','',...) failed: Access denied for user 'daryl'@'localhost'
>(using password: NO) at ./mythconverg_restore.pl line 933.
>
>Unable to connect to database.
>           database: mythconverg
>               host:
>           username:
>           password:
>
>Please check your configuration files to verify the database connection
>information is correct.  The files that are used to retrieve connection
>information are prefixed with "parsing" in the "Parsing configuration files"
>section of the --verbose output.
>
>Also note that any [client] or [mysql] password specified in the MySQL
>options
>file (/etc/my.cnf or /etc/mysql/my.cnf or ~/.my.cnf) will take precedence
>over
>the password specified in the MythTV configuration files.
>
>ERROR: Unable to connect to database.

It looks like you have restored the /etc/mythtv/config.xml file, which
contains the password to access the mythconverg database.  But the
MariaDB or MySQL database system you are restoring to is clean - it
does not have the user/password that was in your old database to allow
access to the mythconverg database.  The user/password data is not
stored in the mythconverg database - it is stored in a separate system
maintained database, and can not be restored by
mythconverg_restore.pl.

So what you need to do is to do the SQL commands needed to add the
user/password from /etc/mythtv/config.xml into the MySQL
authentication system.  See this page for how:

https://www.mythtv.org/wiki/Category:MySQL

Search for "Access denied for user".


More information about the mythtv-users mailing list