Overclockers Australia Forums

OCAU News - Wiki - QuickLinks - Pix - Sponsors  

Go Back   Overclockers Australia Forums > Software Topics > Other Operating Systems

Notices


Sign up for a free OCAU account and this ad will go away!
Search our forums with Google:
Reply
 
Thread Tools
Old 17th May 2017, 7:34 AM   #5776
daehenoc
Member
 
daehenoc's Avatar
 
Join Date: Nov 2005
Location: Mt Gravatt E, BNE, QLD
Posts: 2,000
Default

Alright. I got the new hardware working, I restored the db from the old hw, and DIDN'T retune channels. Duur, how about that, the tuners can see SBS and whatever just fine. So, WAF is up, hooray.

BAD NEWS, I cocked up mounting the TV recordings lv and the root partition filled up overnight, boo. Fixed the mounts first thing this morning, but the db couldn't write and is buggered, as far as I can tell, well, mysql won't start, sigh.

The easiest way of recovering is to restore from my most recent mysql backup, right? God knows what is broken in the db after the partition filled up. (Does anyone here put their db on a separate lv/partition?)
daehenoc is offline   Reply With Quote

Join OCAU to remove this ad!
Old 17th May 2017, 11:58 AM   #5777
HyRax1
ˇViva la Resolutión!
 
HyRax1's Avatar
 
Join Date: Jun 2001
Location: At a desk. Distro:Ubuntu
Posts: 7,693
Default

My /home /var and /srv are all on separate partitions/volumes to protect against accidental filling up of the root filesystem.

Yes, restore your most recent backup and you should be fine (bar missing any info about recordings taken since that backup).
__________________
If practice makes perfect, and nobody's perfect, why practice?
HyRax1 is offline   Reply With Quote
Old 17th May 2017, 4:11 PM   #5778
daehenoc
Member
 
daehenoc's Avatar
 
Join Date: Nov 2005
Location: Mt Gravatt E, BNE, QLD
Posts: 2,000
Default

I used to do that for years, and had no 'full root' partition events, and got lazy... Oh well, that will (re)learn me!
daehenoc is offline   Reply With Quote
Old 17th May 2017, 4:31 PM   #5779
daehenoc
Member
 
daehenoc's Avatar
 
Join Date: Nov 2005
Location: Mt Gravatt E, BNE, QLD
Posts: 2,000
Default

Crap. mysql won't start, and the very helpful log event is:
Code:
sudo /etc/init.d/mysql status
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: activating (start-post) (Result: exit-code) since Wed 2017-05-17 16:30:25 AEST; 17s ago
  Process: 10284 ExecStart=/usr/sbin/mysqld (code=exited, status=2)
  Process: 10275 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 10284 (code=exited, status=2);         : 10285 (mysql-systemd-s)
    Tasks: 2
   Memory: 12.3M
      CPU: 321ms
   CGroup: /system.slice/mysql.service
           └─control
             ├─10285 /bin/bash /usr/share/mysql/mysql-systemd-start post
             └─10348 sleep 1

May 17 16:30:25 mythtvserver17 systemd[1]: Starting MySQL Community Server...
May 17 16:30:25 mythtvserver17 systemd[1]: mysql.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Er, does anyone have any pointers on how to fix this?

Edit: Talking to myself here, I moved all the files out of the /var/lib/mysql/mythconverg directory, figuring that they would all be replaced anyway, and that the db files in /var/lib/mysql/mysql probably wouldn't have changed, and yeeha, mysql started and I've been able to restore the mythtv database!
Now to see if I can run mythtv-setup...

Edit edit: No. tail of mythtv-setup.log has this as the last line:
Code:
May 17 17:00:38 mythtvserver17 mythtv-setup.real: mythtv-setup[13915]: E CoreContext main.cpp:533 (main) MySQL time zone support is missing.  Please install it and try again.  See 'mysql_tzinfo_to_sql' for assistance.
Following the instructions at https://www.mythtv.org/wiki/MySQL_Time_Zone_Tables, I can't run mysql, I get told "ERROR 1524 (HY000): Plugin 'auth_socket' is not loaded". I'm googling to see if I can find a fix, no luck so far.

How do I completely drop all config from mysql and create it all from scratch? Without being able to log onto mysql?

Last edited by daehenoc; 17th May 2017 at 5:03 PM.
daehenoc is offline   Reply With Quote
Old 17th May 2017, 5:12 PM   #5780
HyRax1
ˇViva la Resolutión!
 
HyRax1's Avatar
 
Join Date: Jun 2001
Location: At a desk. Distro:Ubuntu
Posts: 7,693
Default

Assuming you don't have any other databases, just purge MySQL from your system:
Code:
$ sudo apt-get purge .*mysql.*
...and that will remove not only the application, but all its configuration too.

Then just reinstall it:

Code:
$ sudo apt-get install mysql-server
(or use "sudo tasksel" and choose the LAMP option again).

MySQL is now back on with default config (which you will need to modify to allow other clients to connect remotely).

Now restore your last MythTV backup and you should theoretically be fine.
__________________
If practice makes perfect, and nobody's perfect, why practice?
HyRax1 is offline   Reply With Quote
Old 17th May 2017, 5:16 PM   #5781
daehenoc
Member
 
daehenoc's Avatar
 
Join Date: Nov 2005
Location: Mt Gravatt E, BNE, QLD
Posts: 2,000
Default

Thanks Hyrax, I'm using Ubuntu 16.04 and when I try to remove mysql:
Code:
$ sudo apt-get purge .*mysql.*
<bunches_of_stuff_clipped>
The following packages will be REMOVED:
  libdbd-mysql-perl* libmysqlclient20* libmyth-0.28-0* libmyth-python* libmythtv-perl* libqt5sql5-mysql* mysql-client-5.7* mysql-client-core-5.7* mysql-common* mysql-server* mysql-server-5.7* mysql-server-core-5.7*
  mythtv-backend* mythtv-backend-master* mythtv-common* mythtv-database* mythtv-dbg* mythtv-transcode-utils* mythweb* php-mysql* php7.0-mysql* python-mysqldb*
Which seems like it'll break a bunch of stuff, the mythtv-backend etc. Which doesn't matter too much, no point in having the mythtv packages installed if the db won't run, I'm just a bit gun shy!

Last edited by daehenoc; 17th May 2017 at 5:20 PM.
daehenoc is offline   Reply With Quote
Old 17th May 2017, 5:26 PM   #5782
HyRax1
ˇViva la Resolutión!
 
HyRax1's Avatar
 
Join Date: Jun 2001
Location: At a desk. Distro:Ubuntu
Posts: 7,693
Default

Quote:
Originally Posted by daehenoc View Post
Which seems like it'll break a bunch of stuff, the mythtv-backend etc. Which doesn't matter too much, no point in having the mythtv packages installed if the db won't run, I'm just a bit gun shy!
Yes, anything dependent on MySQL will be removed as well - sorry, should have mentioned that.

You could use dpkg to remove MySQL without removing dependent apps (ie: deliberately create broken dependencies), but that is not recommended.
__________________
If practice makes perfect, and nobody's perfect, why practice?
HyRax1 is offline   Reply With Quote
Old 17th May 2017, 5:27 PM   #5783
daehenoc
Member
 
daehenoc's Avatar
 
Join Date: Nov 2005
Location: Mt Gravatt E, BNE, QLD
Posts: 2,000
Default

Yeah, I've forced broken dependencies before, it's not fun.

I'll have to come back to this later on tonight, I will have to bite the bullet and remove the broken mysql stuff, it's not working anyway, right?!?!

HOLY - I can get onto the db with use mythtv! Um, why can I get onto the db as this user but mythtv-setup fails???

Last edited by daehenoc; 17th May 2017 at 5:42 PM.
daehenoc is offline   Reply With Quote
Old 18th May 2017, 8:10 AM   #5784
HyRax1
ˇViva la Resolutión!
 
HyRax1's Avatar
 
Join Date: Jun 2001
Location: At a desk. Distro:Ubuntu
Posts: 7,693
Default

If you can connect manually from the terminal from the remote PC, you should be fine, ie:

Code:
$ mysql -u mythtv -p mythconverg -h IP.OF.BACKEND.PC
If you cannot do that, but it works directly on the server referring to 127.0.0.1, then you haven't configured MySQL to accept external connections.
__________________
If practice makes perfect, and nobody's perfect, why practice?
HyRax1 is offline   Reply With Quote
Old 18th May 2017, 9:08 PM   #5785
daehenoc
Member
 
daehenoc's Avatar
 
Join Date: Nov 2005
Location: Mt Gravatt E, BNE, QLD
Posts: 2,000
Default

Something was totally toasted, that was for sure.

I fixed my situation like this:
Blow away all the files in /var/lib/mysql
run: mysqld --initialize-insecure
Set up the blank mythtv db: mysql -u root < /usr/share/mythtv/sql/mc.sql
update the password for the mythtv sql user to match the password in the sql backup and restore said backup:
./mythconverg_restore.pl --drop_database --create_database --filename ../bladeblabla/mythconverg-1317-datestamp.sql.gz --verbose
reinstall the TZ data: https://www.mythtv.org/wiki/MySQL_Time_Zone_Tables

and I can now run $ sudo setup-mythtv

holy crap. going to bed, will see what I've got tomorrow afternoon

Thanks for the help, HyRax!
daehenoc is offline   Reply With Quote
Old 19th May 2017, 12:32 PM   #5786
daehenoc
Member
 
daehenoc's Avatar
 
Join Date: Nov 2005
Location: Mt Gravatt E, BNE, QLD
Posts: 2,000
Default

Quote:
Originally Posted by HyRax1 View Post
Code:
$ sudo apt-get purge .*mysql.*
Well, I got it all back and working, but there was a strange problem, the db was just a bit slow, which caused playback issues, there was a slight stuttering as the frontend reported 'waiting for buffer 105ms AAUAUuauauauuAAAAIIIII'.

Given that I'd spent hours on it already, I did what you suggested and pissed off all the mysql packages, reinstalled mysql-server and mythtv-backend and mythtv-database, successfully restored the backup and everything is working again without any buffering, hooray!
daehenoc is offline   Reply With Quote
Old 19th May 2017, 1:03 PM   #5787
HyRax1
ˇViva la Resolutión!
 
HyRax1's Avatar
 
Join Date: Jun 2001
Location: At a desk. Distro:Ubuntu
Posts: 7,693
Default

Well done, young grasshopper!
__________________
If practice makes perfect, and nobody's perfect, why practice?
HyRax1 is offline   Reply With Quote
Old 21st May 2017, 4:07 PM   #5788
flu!d
Ubuntu Mate 16.04 LTS
 
flu!d's Avatar
 
Join Date: Jun 2001
Posts: 10,616
Default

I've switched from MythTV to TVHeadend, personally I find TVHeadend far better than MythTV.
__________________
Show us yer HTPC!

Dell T5500, Xeon X5675 Hex core @ 3.46Ghz max, 24GB RAM, GTX 670FTW, 60GB OCZ Vertex 3 SSD OS drive, 2 x 1TB home/storage drives, Dual Acer V243HQ 1920 x 1080 monitors, Ubuntu Mate 16.04 LTS and loving it!
flu!d is offline   Reply With Quote
Old 21st May 2017, 4:10 PM   #5789
daehenoc
Member
 
daehenoc's Avatar
 
Join Date: Nov 2005
Location: Mt Gravatt E, BNE, QLD
Posts: 2,000
Default

Quote:
Originally Posted by HyRax1 View Post
Well done, young grasshopper!
Thanks for your heap! I couldn't get the debian-sys-maint account recreated in the db, and decided to try the remove mysql and reinstall, if that hadn't worked, I was going to take off and nuke it from orbit
daehenoc is offline   Reply With Quote
Old 21st May 2017, 7:41 PM   #5790
The Sentinel
Member
 
The Sentinel's Avatar
 
Join Date: Jan 2002
Posts: 2,752
Default

Noe that mythbuntu is no more, how are you Ubuntu guys doing new frontend installs?
Just a vanilla Ubuntu with the myth packages?
__________________
Facebook does for being social what Osama bin Laden did for Lower Manhattan Architecture.
The Sentinel is offline   Reply With Quote
Reply

Bookmarks

Tags
htpc, mythtv

Sign up for a free OCAU account and this ad will go away!

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +10. The time now is 5:42 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
OCAU is not responsible for the content of individual messages posted by others.
Other content copyright Overclockers Australia.
OCAU is hosted by Micron21!