Cannot start database

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
pinnerite
Senior
Posts: 256
Joined: Mon Apr 07, 2014 2:34 pm
Great Britain

Cannot start database

Post by pinnerite »

I had been running Mythtv version 31 on Mint 20.3.

I made a clean install of mint 21.1 on second drive. This has Mythtv Version 32.

I copied over most of my data files from /home, leaving out contentious hidden files.
I took a backup of the mythconverg database using mythtconverg-backup.pl

On the new system I then ran the script below but it only seemed to partially complete
#! /bin/bash
#
# mythconverg-prep.sh
#
# Have you done the following before running this:
# 1) Added a user mythtv to the system.
# 2) Edit /etc/mysql/my.cnf
# change bind-address=127.0.0.1 to 192.168.1.5
# only when using a remote front end
# 3)restart mysql by: /etc/init.d/mysql/restart
#
#
mysql -u root -p
create database mythconverg;
create user 'mythtv'@'%' identified by 'mythtv';
create user 'mythtv'@'albury' identified by 'mythtv';
set password for 'mythtv'@'%' =password('mythtv');
set password for 'mythtv'@'albury' = password('mythtv');
connect mythconverg;
grant all privileges on *.* to 'mythtv'@'%' with grant option;
grant all privileges on *.* to 'mythtv'@'albury' with grant option;
grant all privileges on mythconverg.* to 'mythtv'@'localhost' with grant option;
flush privileges;
exit;
EOF
Nevertheless I was able to successfully restore using:
root@albury:~# ./mythconverg_restore.pl --drop_database --create_database --directory /home/mythtv/DB_Backups --filename mythconverg-1361-20230310180854.sql.gz

I can now only access mysql from a root prompt. From that I was able run this:

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> SELECT User,Host,plugin,authentication_string FROM user WHERE user='mythtv';
+--------+------+-----------------------+-------------------------------------------+
| User | Host | plugin | authentication_string |
+--------+------+-----------------------+-------------------------------------------+
| mythtv | % | mysql_native_password | *778F7D2F23E607D26997038580963D1857CE9D8C |
+--------+------+-----------------------+-------------------------------------------+
1 row in set (0.00 sec)

I have now run out of steam.
Help please?
User avatar
bill6502
Developer
Posts: 2299
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Cannot start database

Post by bill6502 »

If mythconverg_restore.pl worked, then a working password was stored somewhere. You
were running it as root, so I'd check ~root/.mythtv/config.xml.

I don't recognize the commands above:
set password for 'mythtv'@'%' =password('mythtv');
set password for 'mythtv'@'albury' = password('mythtv');
Proper commands are here: https://github.com/MythTV/mythtv/blob/m ... ase/mc.sql
Post Reply