Domotica beginners problem

Forum about Domotica Home Automation for dummies, is only for the real beginner questions.

Moderator: TANE

Post Reply
p.bierhuizen
Starting Member
Starting Member
Posts: 3
Joined: Wed Mar 30, 2016 10:19 pm
Location: BREDA

Domotica beginners problem

Post by p.bierhuizen »

Everytime my Raspberry is started up, it comes with following errormessages in the logfile :

[MySQL] Database on host 'localhost'.
[Main] Couldn't open the database (called 'domotiga') Check './server-domotiga.conf' or create & load a database. Sleeping 2 seconds.
[Main] MySQL ERROR: Cannot open database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
[Main] ERROR: Couldn't open the database (called 'domotiga') Check './server-domotiga.conf' or create & load a database. Sleeping 2 seconds.
[Main] MySQL ERROR: Cannot open database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
[Main] ERROR: Couldn't open the database (called 'domotiga') Check './server-domotiga.conf' or create & load a database. Sleeping 2 seconds.
[Main] MySQL ERROR: Cannot open database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
[Main] Connecting to database ...

Can someone here tell me what is happening and how I can avoid these error messages ?
Thanks in advance,
Paul Bierhuizen
DomotiGa on Raspberripi 2B
raymonvdm
Senior Member
Senior Member
Posts: 1153
Joined: Sun Dec 18, 2011 1:23 am

Re: Domotica beginners problem

Post by raymonvdm »

Maybe Domotiga is starting before MySQL is running? Does the following command tells you that it is running?

Code: Select all

/etc/init.d/mysql status
Maybe you can add a sleep to the startup script or domotiga. Or the init file may need a sleept (/etc/init.d/domotiga?)
Running HS3PRO on PC with Z-Wave / OpenTherm / Plugwise / RFXcom / MQTT / XAP400 / Logitech Media Server and Squeezelite on PI`s
p.bierhuizen
Starting Member
Starting Member
Posts: 3
Joined: Wed Mar 30, 2016 10:19 pm
Location: BREDA

Re: Domotica beginners problem

Post by p.bierhuizen »

The mysql server is definitely running. I can access the db from another computer.
But adding a sleep in the startup script is a very good idea ! I am going to try that one.
Thanks for your help.
DomotiGa on Raspberripi 2B
p.bierhuizen
Starting Member
Starting Member
Posts: 3
Joined: Wed Mar 30, 2016 10:19 pm
Location: BREDA

Re: Domotica beginners problem

Post by p.bierhuizen »

Hello Raymon,
The mysql server is running. I can connect to it from another PC.
But the sleep was a very good idea. I have now added 'mysql' behind the Required-Start and Stop in domotigaserver3,
which will make sure that starting the domotigaserver will only take place after starting the mysql server.
I just tested it and it works fine now.
Thanks for your help,
Paul Bierhuizen
DomotiGa on Raspberripi 2B
Post Reply

Return to “Domotica for Dummies Forum”