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
Domotica beginners problem
Moderator: TANE
-
- Starting Member
- Posts: 3
- Joined: Wed Mar 30, 2016 10:19 pm
- Location: BREDA
Domotica beginners problem
DomotiGa on Raspberripi 2B
Re: Domotica beginners problem
Maybe Domotiga is starting before MySQL is running? Does the following command tells you that it is running?
Maybe you can add a sleep to the startup script or domotiga. Or the init file may need a sleept (/etc/init.d/domotiga?)
Code: Select all
/etc/init.d/mysql status
Running HS3PRO on PC with Z-Wave / OpenTherm / Plugwise / RFXcom / MQTT / XAP400 / Logitech Media Server and Squeezelite on PI`s
-
- Starting Member
- Posts: 3
- Joined: Wed Mar 30, 2016 10:19 pm
- Location: BREDA
Re: Domotica beginners problem
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.
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
-
- Starting Member
- Posts: 3
- Joined: Wed Mar 30, 2016 10:19 pm
- Location: BREDA
Re: Domotica beginners problem
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
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