Mailing List Archive

I spoke too soon.
After saying earlier today that all was well I had to shut down today
and now I get the following message when I try to run mythfilldatabase

Can't connect to MySQL server

When I run mythtv-setup I get

Mythtv could not connect to the database

I have checked that the database name, user and password are the same as in

/etc/mythtv/config.xml

and /home/robert/.mythtv/config.xml

What should I check next?

--
Robert


_______________________________________________
mythtvnz mailing list
mythtvnz@lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
Re: I spoke too soon. [ In reply to ]
On 03/08/16 17:35, Robert Fisher wrote:
> After saying earlier today that all was well I had to shut down today
> and now I get the following message when I try to run mythfilldatabase
>
> Can't connect to MySQL server
>
> When I run mythtv-setup I get
>
> Mythtv could not connect to the database
>
> I have checked that the database name, user and password are the same
> as in
>
> /etc/mythtv/config.xml
>
> and /home/robert/.mythtv/config.xml
>
> What should I check next?
>
When I ran
sudo systemctl restart mysql.service
I got
Job for mysql.service failed because the control process exited with
error code. See "systemctl status mysql.service" and "journalctl -xe"
for details.

So then I ran
sudo systemctl status mysql.service

and I got
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
2016-08-03 17:42:34 NZST; 3s ago
Process: 7246 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Process: 7242 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre
(code=exited, status=0/SUCCESS)
Main PID: 7246 (code=exited, status=1/FAILURE); : 7247
(mysql-systemd-s)
Tasks: 2 (limit: 512)
CGroup: /system.slice/mysql.service
\u2514\u2500control
\u251c\u25007247 /bin/bash
/usr/share/mysql/mysql-systemd-start post
\u2514\u25007281 sleep 1

Aug 03 17:42:34 FishMyth systemd[1]: Starting MySQL Community Server...
Aug 03 17:42:36 FishMyth systemd[1]: mysql.service: Main process exited,
code=exited, status=1/FAILURE


--
Robert


_______________________________________________
mythtvnz mailing list
mythtvnz@lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
Re: I spoke too soon. [ In reply to ]
On Wed, 3 Aug 2016 17:50:26 +1200, you wrote:

>On 03/08/16 17:35, Robert Fisher wrote:
>> After saying earlier today that all was well I had to shut down today
>> and now I get the following message when I try to run mythfilldatabase
>>
>> Can't connect to MySQL server
>>
>> When I run mythtv-setup I get
>>
>> Mythtv could not connect to the database
>>
>> I have checked that the database name, user and password are the same
>> as in
>>
>> /etc/mythtv/config.xml
>>
>> and /home/robert/.mythtv/config.xml
>>
>> What should I check next?
>>
>When I ran
>sudo systemctl restart mysql.service
>I got
>Job for mysql.service failed because the control process exited with
>error code. See "systemctl status mysql.service" and "journalctl -xe"
>for details.
>
>So then I ran
>sudo systemctl status mysql.service
>
>and I got
>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
>2016-08-03 17:42:34 NZST; 3s ago
> Process: 7246 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
> Process: 7242 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre
>(code=exited, status=0/SUCCESS)
> Main PID: 7246 (code=exited, status=1/FAILURE); : 7247
>(mysql-systemd-s)
> Tasks: 2 (limit: 512)
> CGroup: /system.slice/mysql.service
> \u2514\u2500control
> \u251c\u25007247 /bin/bash
>/usr/share/mysql/mysql-systemd-start post
> \u2514\u25007281 sleep 1
>
>Aug 03 17:42:34 FishMyth systemd[1]: Starting MySQL Community Server...
>Aug 03 17:42:36 FishMyth systemd[1]: mysql.service: Main process exited,
>code=exited, status=1/FAILURE

You need to find the error message from mysqld. Go to /var/log and
look in syslog or the log files in /var/log/mysql. There should be a
message telling you why it failed to start. Try searching for the
text "mysql" in syslog.

Have you run Mythbuntu Control Centre and enabled the MySQL tweaks?
That causes this sort of problem, but it only shows up when mysql is
restarted. If that is the problem, go to /etc/mysql and run this
command:

grep -r table_cache *

If you get any lines where that is a match that do not start with a #
character, change the "table_cache" to "table_open_cache".

_______________________________________________
mythtvnz mailing list
mythtvnz@lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
Re: I spoke too soon. [ In reply to ]
On 03/08/16 20:02, Stephen Worthington wrote:
> You need to find the error message from mysqld. Go to /var/log and
> look in syslog or the log files in /var/log/mysql. There should be a
> message telling you why it failed to start. Try searching for the
> text "mysql" in syslog.
That is a big log file so I moved onto the next step.
> Have you run Mythbuntu Control Centre and enabled the MySQL tweaks?
Yes I had (I misread your earlier reply to Worik).
So I switched it off again.
> That causes this sort of problem, but it only shows up when mysql is
> restarted. If that is the problem, go to /etc/mysql and run this
> command:
>
> grep -r table_cache *
>
> If you get any lines where that is a match that do not start with a #
> character, change the "table_cache" to "table_open_cache".
There was a # at the beginning of the line so (after switching off the
tweaks) I rebooted and all seems fine again.

You are a star. (I have thought that quite a few times recently)

Thanks so much.

--
Robert


_______________________________________________
mythtvnz mailing list
mythtvnz@lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/